30.03.2016, 14:17
Someone can give me a samp nrg/inferno spawn command, with destroy? I make one but it's a little bugged.. this is my command:
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new Float:Pos[3],inf[MAX_PLAYERS],nrg[MAX_PLAYERS];
if(!strcmp(cmdtext,"/inf",true))
{
if(inf[playerid] == 0)
{
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
inf[playerid] = CreateVehicle(411,Pos[0],Pos[1],Pos[2],0,-1,-1,10);
PutPlayerInVehicle(playerid,inf[playerid],0);
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned An Infernus.");
return 1;
}
else if(inf[playerid] > 0)
{
DestroyVehicle(inf[playerid]);
inf[playerid] = 0;
}
return 1;
}
if(!strcmp(cmdtext,"/nrg",true))
{
if(nrg[playerid] == 0)
{
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
nrg[playerid] = CreateVehicle(522,Pos[0],Pos[1],Pos[2],0,-1,-1,10);
PutPlayerInVehicle(playerid,nrg[playerid],0);
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned A NRG-500.");
return 1;
}
else if(nrg[playerid] > 0)
{
DestroyVehicle(nrg[playerid]);
nrg[playerid] = 0;
}
return 1;
}
return 0;
}