03.03.2009, 11:51
To lock the vehicle:
vehicleid - ID of the car.
playerid - ID of the player.
objective - Show the vehicle as a marker for the player true/false.
doorslocked - Doors locked true/false.
You can compare strings with strcmp. Example:
strcmp() in the wiki
pawn Код:
SetVehicleParamsForPlayer(vehicleid, playerid, objective, doorslocked)
playerid - ID of the player.
objective - Show the vehicle as a marker for the player true/false.
doorslocked - Doors locked true/false.
You can compare strings with strcmp. Example:
pawn Код:
// This would go under the /enterhouse(or whatever it is) command.
new name[MAX_PLAYER_NAME]; // Creating the name string.
GetPlayerName(playerid, name, sizeof(name)); // Getting the name of the player and inserting it to the name string.
if(!strcmp("APpLepIe", name, false)) // Comparing the name string (player's name) with "APpLepIe"
{
//The player's name is "APpLepIe".
SetPlayerPos();
SetInt etc.
}
else return 1; // The player's name wasn't "APpLepIe", so return 1.