28.07.2015, 21:48
Hi! I have this code for the spawning
But the thing is that after a player leave the NRG it will stay there respawning like all the other cars! There's a way to make the nrg despawn forever after a few seconds if a player leaves it? Thanks.
Код:
if(!strcmp(cmdtext,"/Nrg",true)) { new nrg[MAX_PLAYERS]; new Float:Pos[MAX_PLAYERS][4]; GetPlayerPos(playerid,Pos[playerid][1],Pos[playerid][2],Pos[playerid][3]); nrg[playerid]=CreateVehicle(522,Pos[playerid][1],Pos[playerid][2],Pos[playerid][3],0,-1,-1,10); PutPlayerInVehicle(playerid,nrg[playerid], 0); SendClientMessage(playerid,0xFF641AFF,"You have spawned a NRG-500."); return 1; }