Stop Respawning car ??
#1

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
Reply
#2

First, new ACAR[MAX_PLAYERS]; should be new ACAR[MAX_VEHICLES];

Second, set respawn time to -1.
Reply
#3

Changed and tested , it still respawns car at place where i typed /acar carid :S
Reply
#4

YOur seriously asking this question?

pawn Код:
OnVehicleDeath(...)
{
     DestroyVehicle(vehicleid);
     return 1;
}
If you dont want all cars deleted make exceptions
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)