06.11.2014, 21:08
(
Последний раз редактировалось ItzRbj; 06.11.2014 в 22:45.
)
-Moved to another thread-
new LastCreatedVeh[MAX_PLAYERS];
LastCreatedVeh[playerid] = CreateVehicle(...)
if(LastCreatedVeh[playerid] != 0) { DestroyVehicle(LastCreatedVeh[playerid]); LastCreatedVeh[playerid]=0; } if(LastCreatedVeh[playerid] == 0) { LastCreatedVeh[playerid] = CreateVehicle(...) } }
Create a variable for each player
Код:
new LastCreatedVeh[MAX_PLAYERS]; for example Код:
LastCreatedVeh[playerid] = CreateVehicle(...) then create an if statement above that saying if they already have a vehicle destroy it.. Код:
if(LastCreatedVeh[playerid] != 0) { DestroyVehicle(LastCreatedVeh[playerid]); LastCreatedVeh[playerid]=0; } if(LastCreatedVeh[playerid] == 0) { LastCreatedVeh[playerid] = CreateVehicle(...) } } |
C:\Users\Mohamed\Desktop\home8\samp\clients\port_8009\filterscripts\fsdebug.pwn(905) : warning 209: function "dcmd_v" should return a value C:\Users\Mohamed\Desktop\home8\samp\clients\port_8009\filterscripts\fsdebug.pwn(908) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.