Don't respawn cars - 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: Don't respawn cars (
/showthread.php?tid=505238)
Don't respawn cars -
Tadas - 07.04.2014
Hello, I have this code:
pawn Код:
new infernus;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
infernus = CreateVehicle(411, x, y, z, 82.2873, 0, 1,60000);
PutPlayerInVehicle(playerid, infernus, 0);
And I want to do when vehicle "infernus" destroy it's doesn't respawn.
Re: Don't respawn cars -
BroZeus - 07.04.2014
use this
pawn Код:
public OnVehicleSpawn(vehicleid)
{
if(vehicleid==infernus)DestroyVehicle(infernus);
return 1;
}
Re: Don't respawn cars -
Tadas - 07.04.2014
Quote:
Originally Posted by BroZeus
use this
pawn Код:
public OnVehicleSpawn(vehicleid) { if(vehicleid==infernus)DestroyVehicle(infernus); return 1; }
|
Not working.
Re: Don't respawn cars -
superrobot48 - 07.04.2014
Код:
infernus = CreateVehicle(411, x, y, z, 82.2873, 0, 1,-1);
EDIT:
Read wiki before scripting
https://sampwiki.blast.hk/wiki/CreateVehicle
and if it worked plz say here and +rep me :3
Re: Don't respawn cars -
Tadas - 07.04.2014
Quote:
Originally Posted by superrobot48
|
Still not working :/
Re: Don't respawn cars -
superrobot48 - 07.04.2014
did u try destroying the vehicle? and did u add it in a timer?!