Szerző Téma: Jármû Lekérõ  (Megtekintve 699 alkalommal)

Nem elérhető Stramm

  • 193
    • Profil megtekintése
Jármû Lekérõ
« Dátum: 2013. február 03. - 13:29:37 »
0 Show voters
Hi valaki készítene nekem a modba egy jármû lekérõt 
-Parancsa /v (id) (Szin)  színt ha nem adnak meg autómatikusan adja
-Amikor lekérte írja ki SendClientMessages-be hogy Jármû lekérve név (jármû neve)
Itt a mod elõre is köszi 

#include <a_samp>
new Text:Textdraw1;
#define SZIN_KEK 0x001effAA
#define SZIN_FEKETE 0x000000AA
#define SZIN_CIAN 0x0af3ffAA
#define SZIN_PIROS 0xff0000AA
#define SZIN_LILA 0xba00dbAA
#define SZIN_FEHER 0xffffffAA
#define SZIN_NARANCS 0xff7300AA
#define SZIN_SZURKE 0x8f8d8bAA
#define SZIN_NEONZOLD 0x3cff00AA
#define SZIN_ZOLD 0x32b30bAA
#define SZIN_ROZSASZ 0xff00ddAA
#define SZIN_CITROM 0xe6e600AA
#define SZIN_DMSZIN 0xf2ff00AA
#if defined FILTERSCRIPT
static minigundm[MAX_PLAYERS]={ -1, ... };
public OnFilterScriptInit()
{
return 0;
}
     print(\"\\n========================================\");
    print(\" KEZDETLEGES MOD\");
    print(\"========================================\\n\");
    return 1;
}
 
public OnFilterScriptExit()
{
    return 1;
}
#else
main()
{
    print(\"\\n========================================\");
    print(\" KEZDETLEGES MOD\");
    print(\"========================================\\n\");
}
#endif
public OnGameModeInit()
{
Textdraw1 = TextDrawCreate(7.000000, 427.000000, \"/info /rules /tele /cmds\");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.509999, 1.800000);
TextDrawColor(Textdraw1, 9454143);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(i, Textdraw1);
        }
    }
SetGameModeText(\"[HuN]Stunt/Minigame/Parkour/Dm\");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
    TextDrawHideForAll(Textdraw0);
    TextDrawDestroy(Textdraw0);
    TextDrawHideForAll(Textdraw1);
    TextDrawDestroy(Textdraw1);
    return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, 0x001effAA, \"..:::Üdv a Szerveren:::..!\");
    SendClientMessage(playerid, 0xe6e600AA, \"Információért=/info /teles /rules /cmds !\");
    SendClientMessage(playerid, 0x3cff00AA, \"Weboldalunk www.gtappfs.ucoz.com\");
    SendClientMessage(playerid, 0xff0000AA, \"Olvasd el figyelmesen a szabályzatot |/rules|\");
    SendClientMessage(playerid, 0xe6e600AA, \"Kellemes Idõtöltése a szerveren\");
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}
public OnPlayerSpawn(playerid)
{
     if(minigundm[playerid] == 0)
    {
    SetPlayerPos(playerid, X, Y, Z);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 38, 9999);
    }
    else
    {
    SetPlayerPos(playerid,2182.3892,1988.3986,10.8203);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
return 1;
    }
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
    return 1;
}
public OnVehicleSpawn(vehicleid)
{
    return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}
public OnPlayerText(playerid, text[])
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
 
//Cmds-----------------------
if (strcmp(cmdtext, \"/cmds\", true)==0)
    {
    ShowPlayerDialog(playerid, 10000, DIALOG_STYLE_MSGBOX, \"Parancsok:\", \"Parancsok\", \"Igen\", \"Mégse\");
//  PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
    return 1;
    }
//Info----------------------------------------
if (strcmp(cmdtext, \"/info\", true)==0)
    {
    ShowPlayerDialog(playerid, 10410, DIALOG_STYLE_MSGBOX, \"Informácíó:\", \"Infók\", \"Igen\", \"Vissza\");
    return 1;
    }
//teles----------------------------------------
if (strcmp(cmdtext, \"/tele\", true)==0)
    {
    ShowPlayerDialog(playerid, 10410, DIALOG_STYLE_MSGBOX, \"Teleportok:\",\"Teleportok\", \"Igen\", \"Vissza\");
    return 1;
    }
    //Szabályzat------------------------------------
if (strcmp(cmdtext, \"/rules\", true)==0)
    {
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, \"Szabályzat:\", \"Szabályzatt\", \"Redben\", \"Vissza\");
    return 1;
    }
//Kisebbb Parancsok-----------------------------------------------------
if(strcmp(cmdtext, \"/parachute\", true) == 0)
    {
    GivePlayerWeapon(playerid, 46, 1);
    SendClientMessage(playerid, 0xe6e600AA, \"Ejtõernyö lekérve\");
    return 1;
    }
    if (strcmp(cmdtext, \"/flip\", true)==0)
    {
    new VehicleID, Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    VehicleID = GetPlayerVehicleID(playerid);
    SetVehiclePos(VehicleID, X, Y, Z);
    SetVehicleZAngle(VehicleID, 0);
    SendClientMessage(playerid, 0xe6e600AA, \"Jármû felálítva\");
    return 1;
    }
    if (strcmp(cmdtext, \"/health\", true)==0)
    {
    SetPlayerHealth(playerid,100);
    SendClientMessage(playerid, 0xe6e600AA, \"Életed feltõltve!\");
    return 1;
    }
    if(strcmp(\"/kill\", cmdtext, true, 10) == 0)  {
{
    SetPlayerHealth(playerid, 000.0);
    return 1;
    }
return SendClientMessage(playerid,0xff0000AA,\"Ismeretlen Parancs\");
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}
public OnRconCommand(cmd[])
{
    return 1;
}
public OnPlayerRequestSpawn(playerid)
{
    return 1;
}
public OnObjectMoved(objectid)
{
    return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}
public OnPlayerExitedMenu(playerid)
{
    return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}
public OnPlayerUpdate(playerid)
{
PlayAudioStreamForPlayer(playerid,ZELE URL CÍME,X,Y,Z,10,1);
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}

Jármû Lekérõ
« Válasz #1 Dátum: 2013. február 03. - 13:46:27 »
0 Show voters

#include <a_samp>
#include <gl_common>
#include <zcmd>
new SpawnedVehicles[MAX_PLAYERS];
 
new VehicleNames[212][] = {
{\"Landstalker\"},{\"Bravura\"},{\"Buffalo\"},{\"Linerunner\"},{\"Perrenial\"},{\"Sentinel\"},{\"Dumper\"},
{\"Firetruck\"},{\"Trashmaster\"},{\"Stretch\"},{\"Manana\"},{\"Infernus\"},{\"Voodoo\"},{\"Pony\"},{\"Mule\"},
{\"Cheetah\"},{\"Ambulance\"},{\"Leviathan\"},{\"Moonbeam\"},{\"Esperanto\"},{\"Taxi\"},{\"Washington\"},
{\"Bobcat\"},{\"Mr Whoopee\"},{\"BF Injection\"},{\"Hunter\"},{\"Premier\"},{\"Enforcer\"},{\"Securicar\"},
{\"Banshee\"},{\"Predator\"},{\"Bus\"},{\"Rhino\"},{\"Barracks\"},{\"Hotknife\"},{\"Trailer 1\"},{\"Previon\"},
{\"Coach\"},{\"Cabbie\"},{\"Stallion\"},{\"Rumpo\"},{\"RC Bandit\"},{\"Romero\"},{\"Packer\"},{\"Monster\"},
{\"Admiral\"},{\"Squalo\"},{\"Seasparrow\"},{\"Pizzaboy\"},{\"Tram\"},{\"Trailer 2\"},{\"Turismo\"},
{\"Speeder\"},{\"Reefer\"},{\"Tropic\"},{\"Flatbed\"},{\"Yankee\"},{\"Caddy\"},{\"Solair\"},{\"Berkley\'s RC Van\"},
{\"Skimmer\"},{\"PCJ-600\"},{\"Faggio\"},{\"Freeway\"},{\"RC Baron\"},{\"RC Raider\"},{\"Glendale\"},{\"Oceanic\"},
{\"Sanchez\"},{\"Sparrow\"},{\"Patriot\"},{\"Quad\"},{\"Coastguard\"},{\"Dinghy\"},{\"Hermes\"},{\"Sabre\"},
{\"Rustler\"},{\"ZR-350\"},{\"Walton\"},{\"Regina\"},{\"Comet\"},{\"BMX\"},{\"Burrito\"},{\"Camper\"},{\"Marquis\"},
{\"Baggage\"},{\"Dozer\"},{\"Maverick\"},{\"News Chopper\"},{\"Rancher\"},{\"FBI Rancher\"},{\"Virgo\"},{\"Greenwood\"},
{\"Jetmax\"},{\"Hotring\"},{\"Sandking\"},{\"Blista Compact\"},{\"Police Maverick\"},{\"Boxville\"},{\"Benson\"},
{\"Mesa\"},{\"RC Goblin\"},{\"Hotring Racer A\"},{\"Hotring Racer B\"},{\"Bloodring Banger\"},{\"Rancher\"},
{\"Super GT\"},{\"Elegant\"},{\"Journey\"},{\"Bike\"},{\"Mountain Bike\"},{\"Beagle\"},{\"Cropdust\"},{\"Stunt\"},
{\"Tanker\"}, {\"Roadtrain\"},{\"Nebula\"},{\"Majestic\"},{\"Buccaneer\"},{\"Shamal\"},{\"Hydra\"},{\"FCR-900\"},
{\"NRG-500\"},{\"HPV1000\"},{\"Cement Truck\"},{\"Tow Truck\"},{\"Fortune\"},{\"Cadrona\"},{\"FBI Truck\"},
{\"Willard\"},{\"Forklift\"},{\"Tractor\"},{\"Combine\"},{\"Feltzer\"},{\"Remington\"},{\"Slamvan\"},
{\"Blade\"},{\"Freight\"},{\"Streak\"},{\"Vortex\"},{\"Vincent\"},{\"Bullet\"},{\"Clover\"},{\"Sadler\"},
{\"Firetruck LA\"},{\"Hustler\"},{\"Intruder\"},{\"Primo\"},{\"Cargobob\"},{\"Tampa\"},{\"Sunrise\"},{\"Merit\"},
{\"Utility\"},{\"Nevada\"},{\"Yosemite\"},{\"Windsor\"},{\"Monster A\"},{\"Monster B\"},{\"Uranus\"},{\"Jester\"},
{\"Sultan\"},{\"Stratum\"},{\"Elegy\"},{\"Raindance\"},{\"RC Tiger\"},{\"Flash\"},{\"Tahoma\"},{\"Savanna\"},
{\"Bandito\"},{\"Freight Flat\"},{\"Streak Carriage\"},{\"Kart\"},{\"Mower\"},{\"Duneride\"},{\"Sweeper\"},
{\"Broadway\"},{\"Tornado\"},{\"AT-400\"},{\"DFT-30\"},{\"Huntley\"},{\"Stafford\"},{\"BF-400\"},{\"Newsvan\"},
{\"Tug\"},{\"Trailer 3\"},{\"Emperor\"},{\"Wayfarer\"},{\"Euros\"},{\"Hotdog\"},{\"Club\"},{\"Freight Carriage\"},
{\"Trailer 3\"},{\"Andromada\"},{\"Dodo\"},{\"RC Cam\"},{\"Launch\"},{\"Police Car (LSPD)\"},{\"Police Car (SFPD)\"},
{\"Police Car (LVPD)\"},{\"Police Ranger\"},{\"Picador\"},{\"S.W.A.T. Van\"},{\"Alpha\"},{\"Phoenix\"},{\"Glendale\"},
{\"Sadler\"},{\"Luggage Trailer A\"},{\"Luggage Trailer B\"},{\"Stair Trailer\"},{\"Boxville\"},{\"Farm Plow\"},
{\"Utility Trailer\"}
};
stock IsNumeric(str[])
{
for (new i = 0, j = strlen(str);
i < j; i++)
{
if (str > \'9\' || str < \'0\')
return 0;
}
return 1;
}
GetVehicleModelIDFromName(vname[])
{
for(new i = 0; i < 211; i++)
{
if ( strfind(VehicleNames, vname, true) != -1 )
return i + 400;
}
return -1;
}
 
CMD:v(playerid, params[])
{
        new string[128];
new Index;
    new tmp[256];  tmp  = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);
    if(!strlen(tmp)) return
SendClientMessage(playerid, 0x55ff00AA, \"{FF0000}Használat: {bbff00}/v [modelid/jármûnév] [szín1] [szín2]\");
new car;
new colour1, colour2;
         if(!IsNumeric(tmp))
    car = GetVehicleModelIDFromName(tmp);
        else car = strval(tmp);
if(car < 400 || car > 611) return  SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Hiba: Nincs ilyen jármû!\");
if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
        if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);
new Float:X,Float:Y,Float:Z;
new Float:Angle,int1;
new LVehicleID = GetPlayerVehicleID(playerid);
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
int1 = GetPlayerInterior(playerid);
SpawnedVehicles[playerid] = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1);
LinkVehicleToInterior(LVehicleID,int1);
PlayerPlaySound(playerid,1085,0,0,0);
PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);
format(string, sizeof(string), \"{007bff}Jármû lespawnolva! {40ff00}Név: %s |(Model ID: %d) | {a200ff}Szín1: %d, Szín2: %d\", VehicleNames[car-400], car, colour1, colour2);
return SendClientMessage(playerid,0xFF9933AA,string);
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal