30.03.2014, 18:20
Hello,
I have started writing my first script from scratch recently, and I need help with two functions:
So my question is: is there any easy way to do that only cars which were created with /freecar command would be destroyed upon exit? At the moment any vehicle is destroyed and not respawning.
I have started writing my first script from scratch recently, and I need help with two functions:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/freecar", cmdtext, true, 8) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); CreateVehicle(542,x,y,z,90,-1,-1,0); return 1; } return 0; }
Код:
public OnPlayerExitVehicle(playerid, vehicleid) { if (GetPlayerVehicleSeat(playerid) == 0) { DestroyVehicle(vehicleid); return 1; } return 0; }