public OnPlayerPause(playerid)
{
if(!YUP_IsPlayerPaused(playerid)) {
new string[128];
format(string, sizeof(string),".AFK рлрс моцб %s дщзчп **",GetName(playerid));
SendClientMessageToAll(COLOR_ORANGE, string);
AFK[playerid] = 1;
TogglePlayerControllable(playerid,0);
}
return 0;
}
//------------------------------------------------------------------------------
public OnPlayerUnpause(playerid)
{
if(YUP_IsPlayerPaused(playerid)) {
new string[128];
format(string, sizeof(string),".AFK йца ооцб %s дщзчп ***",GetName(playerid));
SendClientMessageToAll(COLOR_GREEN, string);
TogglePlayerControllable(playerid,1);
AFK[playerid] = 0;
}
return 0;
}
//------------------------------------------------------------------------------
public OnPlayerPause(playerid) { new string[128]; format(string, sizeof(string),".AFK рлрс моцб %s дщзчп **",GetName(playerid)); SendClientMessageToAll(COLOR_ORANGE, string); AFK[playerid] = 1; TogglePlayerControllable(playerid,0); return 0; } //------------------------------------------------------------------------------ public OnPlayerUnpause(playerid) { new string[128]; format(string, sizeof(string),".AFK йца ооцб %s дщзчп ***",GetName(playerid)); SendClientMessageToAll(COLOR_GREEN, string); TogglePlayerControllable(playerid,1); AFK[playerid] = 0; return 0; } //------------------------------------------------------------------------------
Try with this:
Код:
public OnPlayerPause(playerid) { new string[128]; format(string, sizeof(string),".AFK рлрс моцб %s дщзчп **",GetName(playerid)); SendClientMessageToAll(COLOR_ORANGE, string); AFK[playerid] = 1; TogglePlayerControllable(playerid,0); return 0; } //------------------------------------------------------------------------------ public OnPlayerUnpause(playerid) { new string[128]; format(string, sizeof(string),".AFK йца ооцб %s дщзчп ***",GetName(playerid)); SendClientMessageToAll(COLOR_GREEN, string); TogglePlayerControllable(playerid,1); AFK[playerid] = 0; return 0; } //------------------------------------------------------------------------------ |
public OnPlayerPause(playerid) // called when the player PAUSES
{
if (!YUP_IsPlayerPaused(playerid)) // Checking if the player ISN'T paused.
Try with this:
Код:
public OnPlayerPause(playerid) { new string[128]; format(string, sizeof(string),".AFK рлрс моцб %s дщзчп **",GetName(playerid)); SendClientMessageToAll(COLOR_ORANGE, string); AFK[playerid] = 1; TogglePlayerControllable(playerid,0); return 0; } //------------------------------------------------------------------------------ public OnPlayerUnpause(playerid) { new string[128]; format(string, sizeof(string),".AFK йца ооцб %s дщзчп ***",GetName(playerid)); SendClientMessageToAll(COLOR_GREEN, string); TogglePlayerControllable(playerid,1); AFK[playerid] = 0; return 0; } //------------------------------------------------------------------------------ |
That's the right code, you were doing this:
pawn Код:
|