Pause system for /admins - 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)
+--- Thread: Pause system for /admins (
/showthread.php?tid=662201)
Pause system for /admins -
Mo123 - 25.12.2018
So I'm trying to figure out how to make a pause system for admins. I would like it to say tabbed in /admins when you're actually tabbed
This is what I've got so far:
Код:
CMD:admins(playerid)
{
new bool:flag, str[128];
SendClientMessage(playerid, COLOR_AQUA, "Administrators online:");
foreach(new i:Player)
{
if(PlayerInfo[i][pAdmin] > 0)
{
flag = true;
if(PlayerPaused[i] == 1)
format(str, sizeof(str), "{00ff6b}[Paused]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));
else if(PlayerInfo[i][pAdminDuty] == 1)
format(str, sizeof(str), "{00ff6b}[Available]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));
else
format(str, sizeof(str), "{FF0000}[Unavailable]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));
SendClientMessage(playerid, -1, str);
}
}
if(!flag)
SendClientMessage(playerid, -1, "There are no admins available currently.");
return 1;
}
The part where the pause is included doesn't work, p much fucks up the entire tab system
Need guidance
Re: Pause system for /admins -
RogueDrifter - 25.12.2018
That's a very badass code WHO WROTE THAT?
Jk, with all seriousness, here's a little include i created that helps you with everything related to players tabbing out of the game c:
https://gist.github.com/RogueDrifter...1b9d5739b8409e
pawn Код:
//Functions:
//__________
IsPlayerPaused(playerid);
IsPlayerAFK(playerid);
//Callbacks:
//__________
OnPlayerPause(playerid);
OnPlayerResume(playerid);
OnPlayerAFK(playerid);
OnPlayerReturn(playerid);
Tabbing out is the 'pause' and 'resume', the 'afk' ones are when someone doesn't move for too long hence they become afk
Re: Pause system for /admins -
Mo123 - 26.12.2018
Quote:
Originally Posted by RogueDrifter
That's a very badass code WHO WROTE THAT?
Jk, with all seriousness, here's a little include i created that helps you with everything related to players tabbing out of the game c:
https://gist.github.com/RogueDrifter...1b9d5739b8409e
pawn Код:
//Functions: //__________ IsPlayerPaused(playerid); IsPlayerAFK(playerid); //Callbacks: //__________ OnPlayerPause(playerid); OnPlayerResume(playerid); OnPlayerAFK(playerid); OnPlayerReturn(playerid);
Tabbing out is the 'pause' and 'resume', the 'afk' ones are when someone doesn't move for too long hence they become afk
|
I put
Код:
#include <rAfk_Checker>
and the file with the rest of the .inc files, yet the output displayed:
Код:
C:\Users\captv\Desktop\main\gamemodes\developer.pwn(9) : fatal error 100: cannot read from file: "rAfk_Checker"
Re: Pause system for /admins -
RogueDrifter - 26.12.2018
Are you sure you named the file rAfk_Checker
Re: Pause system for /admins -
Mo123 - 26.12.2018
Quote:
Originally Posted by RogueDrifter
Are you sure you named the file rAfk_Checker
|
I did yeah