03.11.2010, 08:02
There is a Function for GetPlayerToggleControllable? Thanks...
TogglePlayerControllable(playerid, 0); //freeze TogglePlayerControllable(playerid, 1); //unfreeze |
stock
togglePlayerControllableEx ( playerid , toggle )
{
SetPVarInt ( playerid , "Controllable", toggle );
TogglePlayerControllable ( playerid, toggle );
}
stock
getPlayerControlStatus ( playerid )
{
return GetPVarInt ( playerid, "Controllable", toggle );
}
There is no native function for that. However, you can make one yourself.
Simply hook the function TogglePlayerControllable, and depending on the result, set a variable for the player. Then you can make a custom function "GetPlayerToggleControllable" to return that variable. This thread would help you with hooking the function: https://sampforum.blast.hk/showthread.php?tid=187195 EDIT: @Hayden: He's trying to get the toggle, not set it. |