SA-MP Forums Archive
Automatic Vehicle Destroy - 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: Automatic Vehicle Destroy (/showthread.php?tid=309088)



Automatic Vehicle Destroy - lamarr007 - 06.01.2012

Hi, I decided to do "Automatic Vehicle Destoy" script for my sever.
I write this :
Код:
new DestroVeh[MAX_PLAYERS];

public OnPlayerExitVehicle(playerid, vehicleid)
{
	if (gangwar[playerid] == 0) {
	DestroVeh[playerid] = vehicleid;
	SetTimer("DesVeh", 10000, 0);
	}
	return 1;
}

forward DesVeh();
public DesVeh()
{
	DestroyVehicle(DestroVeh[playerid]);
	return 1;
}
But I have this error :
Код:
D:\Program Files (x86)\Rockstar Games\GTA San Andreas\filterscripts\BamAdmin.pwn(214) : error 017: undefined symbol "playerid"
I know what is this, but, how can you I fix it please ?


Re: Automatic Vehicle Destroy - [Diablo] - 06.01.2012

pawn Код:
SetTimerEx("DesVeh", 10000, 0, "i", playerid);
pawn Код:
forward DesVeh(playerid);
public DesVeh(playerid)
{
    DestroyVehicle(DestroVeh[playerid]);
    return 1;
}



Re: Automatic Vehicle Destroy - lamarr007 - 06.01.2012

Thanks )


Re: Automatic Vehicle Destroy - [Diablo] - 06.01.2012

glad i could help.