12.09.2009, 15:15
Hi,
I'm currently working on an special edition of Yagu's Race Filterscript again, because I lost my old one.
So here is my function:
I get this error two times:
Undefined symbol "currentvehicle"
Both in the RespawnPlayerInVehicle function.
My problem is to get the variable defined in OnPlayerExitVehicle, into RespawnPlayerInVehicle.
Can it be done, or is there a workarround?
There is a new problem. Look last post...
I'm currently working on an special edition of Yagu's Race Filterscript again, because I lost my old one.
So here is my function:
Код:
public OnPlayerExitVehicle(playerid, vehicleid) { if(RaceParticipant[playerid]>0) { if (EnableRespawn == 1) { new currentvehicle = (GetPlayerVehicleID(playerid)); new lastCP = (CurrentCheckpoint[playerid]-1); DestroyVehicle(currentvehicle); SetPlayerHealth(playerid, 0); SetRaceCheckpoint(playerid,lastCP,CurrentCheckpoint[playerid]); RespawnTimer = SetTimer("RespawnPlayerInVehicle", RespawnDelay, false); RespawnPlayerInVehicle(playerid, currentvehicle); } } return 1; } stock RespawnPlayerInVehicle(playerid, vehicleid) { new lastCP = (CurrentCheckpoint[playerid]-1); SpawnPlayer(playerid); SetPlayerPos(playerid, lastCP); CreateVehicle(currentvehicle, lastCP, 2, 4, 600); PutPlayerInVehicle(playerid, currentvehicle, 0); KillTimer(RespawnTimer); }
Undefined symbol "currentvehicle"
Both in the RespawnPlayerInVehicle function.
My problem is to get the variable defined in OnPlayerExitVehicle, into RespawnPlayerInVehicle.
Can it be done, or is there a workarround?
There is a new problem. Look last post...