This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
TogglePauseMenuAbility
GtakillerIV edited this page Nov 15, 2014
·
5 revisions
Allows or denies access to the pause menu
If a player tries to enter the main menu while he/she has no permission to, the mouse will stop working.
playerid
The player's id.
bool:toggle
Whether to allow access or not.
Can be true
or false
.
0 if the player is not connected
CMD:togglepause(playerid, params[])
{
new targetid, bool:toggle;
if(sscanf(params, "ub", targetid, toggle)) return SendClientMessage(playerid, -1, "Correct usage: /togglepause playerid 1/0");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "The requested player is not connected");
if(!IsUsingSAMPP(targetid)) return SendClientMessage(playerid, -1, "The requested player doesn't have the SA-MP+ plugin installed");
TogglePauseMenuAbility(playerid, toggle);
SendClientMessage(playerid, -1, "The requested player will now/not be able to view the main menu");
return 1;
}
See also
Callbacks