Stop Respawning car ?? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Stop Respawning car ?? (
/showthread.php?tid=310560)
Stop Respawning car ?? -
DonWade - 12.01.2012
I have tried many ways but with no success , so i have my /car command , but on vehicle death or on vehicle spawn i want to destroy that car but it still respawns it on place where i created it ...
code:
Код:
new ACAR[MAX_PLAYERS];
DestroyVehicle(ACAR[vehicleid]);// this is on vehicle death
DestroyVehicle(ACAR[vehicleid]); // on vehicle spawn
// and this is the car command
dcmd_acar(playerid,params[])
{
new Float:x, Float:y, Float:z ;
GetPlayerPos(playerid, x, y, z);
new carid;
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, "Unknown command. Use /cmds to see our server commands.");
if(sscanf(params, "i", carid))
{
SendClientMessage(playerid,COLOR_RED,"USAGE: /Car [ID]");
return 1;
}
if(carid > 611 || carid < 400)
{
SendClientMessage(playerid,COLOR_RED,"Vehicle ID 400-611");
return 1;
}
ACAR[playerid] = CreateVehicle(carid, x, y, z, 0, 0, 1, 500);
PutPlayerInVehicle(playerid, ACAR[playerid], 0);
return 1;
}
i tried with setting respawn time to -1 , but no effect :confused
Re: Stop Respawning car ?? -
Rokzlive - 12.01.2012
First, new ACAR[MAX_PLAYERS]; should be new ACAR[MAX_VEHICLES];
Second, set respawn time to -1.
Re: Stop Respawning car ?? -
DonWade - 12.01.2012
Changed and tested , it still respawns car at place where i typed /acar carid :S
Re: Stop Respawning car ?? -
IceCube! - 12.01.2012
YOur seriously asking this question?
pawn Код:
OnVehicleDeath(...)
{
DestroyVehicle(vehicleid);
return 1;
}
If you dont want all cars deleted make exceptions
Re: Stop Respawning car ?? -
DonWade - 13.01.2012
Quote:
Originally Posted by IceCube!
YOur seriously asking this question?
pawn Код:
OnVehicleDeath(...) { DestroyVehicle(vehicleid); return 1; }
If you dont want all cars deleted make exceptions
|
Read my post from top , i have that line