19.10.2010, 21:04
Quote:
you can also do it this way (this is a kinda stupid and long way, however you can learn it by using this at the beginning)
imagine the player is called: Peter at the top of your script: Код:
new peter; Код:
peter = AddStaticVehicle(................); Код:
new v = GetPlayerVehicleID(playerid); if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT){ if(v = peter){ new owner[50]; GetPlayerName(playerid, owner, 50); if(!strcmp(owner, "Peter", true)){ SendClientMessage(playerid, YOURCOLOR, "This vehicle is assigned to you"); }else{ RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, YOURCOLOR, "This vehicle belongs to Peter"); } } return 1; } then you get the name of the player and check whether the name is = "Peter" and if it is it will send a message to Peter that this vehicle is assigned to him... if it is not Peter the player will get a message which tells him that the vehicle belongs to Peter and will remove him from the vehicle... I hope I could help you a bit:P |