killdahobo99
Unregistered
I tryed searching, but cannot find the right topics....
How do i make it so, if cars are /locked as the player gets out of the car it is automatically unlocked by itself.?
Thanks guys
killdahobo99
Unregistered
Quote:
Originally Posted by saiberfun
pawn Код:
OnPlayerExitVehicle(playerid,vehicleid) { SetVehicleParamsForPlayer(vehicleid,playerid,0,0); return 1; }
Quote:
Originally Posted by Sa:Mp Wiki
SetVehicleParamsForPlayer
Sets certain properties of a car for a player.
Important note: Disabling the objective works only if the car is respawned after
Parameters:
(vehicleid,playerid,objective,doorslocked)
vehicle ID of the vehicle
playerid ID of the player
objective Show a marker above the car for this player?
doorslocked 0 means open,1 means locked
This function does not return a specific value, it's best to simply ignore it.
|
http://wiki.sa-mp.com
very usefull just browse abit through it and learn sum stuff^-^
then u wont need to ask so much on here
|
That does not work, i get an error....
This is what i have under OnPlayerExitVehicle
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
InCar[playerid] = 0;
return 1;
}
{
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return 1;
}
Posts: 2,799
Threads: 95
Joined: Jun 2006
Reputation:
0
One thing you need to know about OnPlayerEnter and OnPlayerExit is that it is called when the player initiates the sequence of entering or exiting a vehicle...a sequence that can be CANCELED by the user. OnPlayerStateChange is called once the players state has actually changed, and that state change occurs after OnPlayerEnter/Exit has been called.
killdahobo99
Unregistered
Quote:
Originally Posted by saiberfun
Quote:
Originally Posted by cοοp
Quote:
Originally Posted by killdahobo99
That does not work, i get an error
|
Show us the error.
|
he did in Code
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
InCar[playerid] = 0;
return 1;
}
{
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
return 1;
}
it was because he just added anoth {
}
like that instead of just adding the playervehicleparams
|
That complies, but...Say someone types /lock, this code you've given me is suppose to unlock the car right? if they get out ?
so how do i make it so it says "Vehicle unlocked" as soon as player gets out? Thanks Guys