Need help with houses scripting
#2

To lock the vehicle:
pawn Код:
SetVehicleParamsForPlayer(vehicleid, playerid, objective, doorslocked)
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:
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.
strcmp() in the wiki
Reply


Messages In This Thread
Need help with houses scripting - by Wheels - 03.03.2009, 11:27
Re: Need help with houses scripting - by Finn - 03.03.2009, 11:51
Re: Need help with houses scripting - by MenaceX^ - 03.03.2009, 12:08
Re: Need help with houses scripting - by Think - 03.03.2009, 12:14
Re: Need help with houses scripting - by x-cutter - 03.03.2009, 12:54
Re: Need help with houses scripting - by Wheels - 04.03.2009, 20:18

Forum Jump:


Users browsing this thread: 1 Guest(s)