27.03.2016, 17:18
Hi, one of my friend give me this script for a nrg/inf car spawner, this is the script:
{
new Float:Pos[4],inf;
new Float:Pose[4],nrg;
if(!strcmp(cmdtext,"/inf",true))
{
GetPlayerPos(playerid,Pos[1],Pos[2],Pos[3]);
inf=CreateVehicle(411,Pos[1],Pos[2],Pos[3],0,-1,-1,10);
PutPlayerInVehicle(playerid,inf, 0);
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned An Infernus.");
return 1;
}
if(!strcmp(cmdtext,"/nrg",true))
{
GetPlayerPos(playerid,Pose[1],Pose[2],Pose[3]);
nrg=CreateVehicle(522,Pose[1],Pose[2],Pose[3],0,-1,-1,10);
PutPlayerInVehicle(playerid,nrg, 0);
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned An NRG-500.");
return 1;
}
return 0;
}
But my problem is, when i use de command, when i am in the vehicle and i type the command again, the previosly car dosen't destroy, and if i spawn de car, and i go outside the car and i type the command agaain the previos car dosen't destroy... pls help i give rep
{
new Float:Pos[4],inf;
new Float:Pose[4],nrg;
if(!strcmp(cmdtext,"/inf",true))
{
GetPlayerPos(playerid,Pos[1],Pos[2],Pos[3]);
inf=CreateVehicle(411,Pos[1],Pos[2],Pos[3],0,-1,-1,10);
PutPlayerInVehicle(playerid,inf, 0);
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned An Infernus.");
return 1;
}
if(!strcmp(cmdtext,"/nrg",true))
{
GetPlayerPos(playerid,Pose[1],Pose[2],Pose[3]);
nrg=CreateVehicle(522,Pose[1],Pose[2],Pose[3],0,-1,-1,10);
PutPlayerInVehicle(playerid,nrg, 0);
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned An NRG-500.");
return 1;
}
return 0;
}
But my problem is, when i use de command, when i am in the vehicle and i type the command again, the previosly car dosen't destroy, and if i spawn de car, and i go outside the car and i type the command agaain the previos car dosen't destroy... pls help i give rep