04.05.2011, 22:12
Hello, i created a command /eject, it throws out a person out of a car, it works fine. There is a problem that i can't fix, if i just write /eject it reads the ID of player as 0... How do i fix it?
Here's the script:
Help please.
Here's the script:
Код:
COMMAND:eject(playerid, params[]) { new zaidejoid; if(ALygis[playerid] >= 1) { if(sscanf(params,"u",zaidejoid)) { SendClientMessage(playerid,orandzine,"{FBDF89}[FunZoneLT]>> /eject [zaidejoid]"); } else { if(!IsPlayerConnected(zaidejoid)) return SendClientMessage(playerid, raudona, "[FunZoneLT]>> Tokio zaidejo nera."); } if(IsPlayerInAnyVehicle(zaidejoid)) { new string[100], zvardas[MAX_PLAYER_NAME], vardas[MAX_PLAYER_NAME]; GetPlayerName(zaidejoid, zvardas, sizeof(zvardas)); GetPlayerName(playerid, vardas, sizeof(vardas)); format(string, sizeof(string), "[FunZoneLT]>> Tu ismetei, %s is masinos.", zvardas); SendClientMessage(playerid, COLOR_LIMEGREEN, string); format(string, sizeof(string), "[FunZoneLT]>> Tave ismete is masinos %s.", vardas); SendClientMessage(zaidejoid, COLOR_LIMEGREEN, string); RemovePlayerFromVehicle(zaidejoid); } else { SendClientMessage(playerid, raudona, "[FunZoneLT]>> Zaidejas ne masinoje!"); } } else { SendClientMessage(playerid,raudona,"[FunZoneLT]>> Jus negalite naudoti sitos komandos."); } return 1; }