05.07.2015, 23:55
i can't use SetVehicleToRespawn(GetplayerVehicleid(playerid); on onplayerstate
how can i make it works

new gCarID[MAX_PLAYERS];
if(newstate == PLAYER_STATE_DRIVER) gCarID[playerid] = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER) SetVehicleToRespawn(gCarID[playerid]); gCarID[playerid] = INVALID_VEHICLE_ID;