SA-MP Forums Archive
YUP.inc problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: YUP.inc problem (/showthread.php?tid=262871)



YUP.inc problem - motherfucker - 19.06.2011

I tried to use it that include:
PHP код:
public OnPlayerPause(playerid)
{
if(!
YUP_IsPlayerPaused(playerid)) {
new 
string[128];
format(stringsizeof(string),".AFK рлрс моцб %s дщзчп **",GetName(playerid));
SendClientMessageToAll(COLOR_ORANGEstring);
AFK[playerid] = 1;
TogglePlayerControllable(playerid,0);
}
return 
0;
}
//------------------------------------------------------------------------------
public OnPlayerUnpause(playerid)
{
if(
YUP_IsPlayerPaused(playerid)) {
new 
string[128];
format(stringsizeof(string),".AFK йца ооцб %s дщзчп ***",GetName(playerid));
SendClientMessageToAll(COLOR_GREENstring);
TogglePlayerControllable(playerid,1);
AFK[playerid] = 0;
}
return 
0;
}
//------------------------------------------------------------------------------ 
The problem is that it does not show my..


Re: YUP.inc problem - motherfucker - 20.06.2011

Someone?


Re: YUP.inc problem - IstuntmanI - 21.06.2011

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; 
} 
//------------------------------------------------------------------------------



Re: YUP.inc problem - MrDeath537 - 21.06.2011

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
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 Код:
public OnPlayerPause(playerid) // called when the player PAUSES
{
    if (!YUP_IsPlayerPaused(playerid)) // Checking if the player ISN'T paused.



Re: YUP.inc problem - motherfucker - 21.06.2011

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
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; 
} 
//------------------------------------------------------------------------------
Not working

Quote:
Originally Posted by MrDeath537
Посмотреть сообщение
That's the right code, you were doing this:

pawn Код:
public OnPlayerPause(playerid) // called when the player PAUSES
{
    if (!YUP_IsPlayerPaused(playerid)) // Checking if the player ISN'T paused.
Not working..