10.03.2017, 04:41
Add this to the top of your script somewhere:
Switch the command to this:
Add this anywhere in the script:
Код:
new DonatorCarTimer[MAX_PLAYERS];
Код:
CMD:dcar(playerid,params[]) { if(PlayerInfo[playerid][LoggedIn] == 1) { if(PlayerInfo[playerid][dRank] >= 1) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); CreateVehicle(411,x,y,z,100,0,0,-1); PutPlayerInVehicle(playerid,411,2); SetTimerEx("DonatorCar", 300000, 0, "i", playerid); SendClientMessage(playerid, red, "WARNING: The car will despawn in 5 minutes!"); } else return SendClientMessage(playerid,red,"ERROR: You Need Atleast Donor Rank 1 To Use This Command"); } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
Код:
forward DonatorCar(playerid); public DonatorCar(playerid) { new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); KillTimer(DonatorCarTimer[playerid]); }