17.11.2010, 21:17
Ok ive got it working but ive hit a problem..
I'd normally know how to do this but i just cant think of anything atm.
Anyway i dont know how to restrict a car i created to 1 name.
I tried this:
But that kicks me out no-matter.
Do anyone know how?
I'd normally know how to do this but i just cant think of anything atm.
Anyway i dont know how to restrict a car i created to 1 name.
I tried this:
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(strcmp(GetName(playerid), VehicleInfo[vehicleid][Owner], true) == 0)
{
return 1;
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
Do anyone know how?