l'm sad bug /admins "AFK" -
Tween73 - 03.03.2017
Код:
CMD:admins(playerid, params[])
{
new string[256];
new Rank[256];
new AFK[256]; // --> AFK
SendClientMessage(playerid, -1, "** Administrators **");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pInfo[i][pAdmin] > 0)
{
switch(pInfo[i][pAdmin])
{
case 1: Rank = "Moderator";
case 2: Rank = "Master Moderator";
case 3: Rank = "Admin";
case 4: Rank = "Master Admin";
case 5: Rank = "Developer";
case 6: Rank = "Web Developer";
case 7: Rank = "Owner";
}
new spName[MAX_PLAYER_NAME];
GetPlayerName(i,spName,MAX_PLAYER_NAME);
if(AFK[playerid]>0) // --> AFK ?
{
format(string,sizeof(string),"%s %s [Id:%d] %s {008080}[AFK]",Rank,spName,i,pInfo[i][pAdmin],AFK); // --> AFK ?
}
else
{
format(string,sizeof(string),"%s %s [Id:%d] %s",Rank,spName,i,pInfo[i][pAdmin]); // --> Back ?
SendClientMessage(playerid, -1, string);
}
}
}
}
Re: l'm sad bug /admins "AFK" -
JessThompson - 03.03.2017
Please explain more about the bug, Like what errors are you receiving?
EDIT: I think I got the jist of what you were on about, Cleaned it up try this
Код:
CMD:admins(playerid, params[])
{
new string[256];
new Rank[256];
new AFK[256]; // --> AFK
SendClientMessage(playerid, -1, "** Administrators **");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pInfo[i][pAdmin] > 0)
{
switch(pInfo[i][pAdmin])
{
case 1: Rank = "Moderator";
case 2: Rank = "Master Moderator";
case 3: Rank = "Admin";
case 4: Rank = "Master Admin";
case 5: Rank = "Developer";
case 6: Rank = "Web Developer";
case 7: Rank = "Owner";
}
new spName[MAX_PLAYER_NAME];
GetPlayerName(i,spName,MAX_PLAYER_NAME);
if(AFK[playerid] > 0) format(string,sizeof(string),"%s %s [Id:%d] %s {008080}[AFK]",Rank,spName,i,pInfo[i][pAdmin],AFK);
else format(string,sizeof(string),"%s %s [Id:%d] %s",Rank,spName,i,pInfo[i][pAdmin]);
SendClientMessage(playerid, -1, string);
}
}
}
}
Re: l'm sad bug /admins "AFK" -
Tween73 - 03.03.2017
Look --->
http://imgur.com/a/QMr4G
Re: l'm sad bug /admins "AFK" -
JessThompson - 03.03.2017
Please show me where this is being set like, You need to set it first
AFK[playerid]
Re: l'm sad bug /admins "AFK" -
Tween73 - 03.03.2017
їHelpMe?
Re: l'm sad bug /admins "AFK" -
JessThompson - 03.03.2017
If you don't have this already, download
https://sampforum.blast.hk/showthread.php?tid=490436 place within
pawno -> includes, then add #include <callbacks> with your other includes inside the script, then add these inside your script
Код:
public OnPlayerPause(playerid)
{
AFK[playerid] = 1;
return 1;
}
public OnPlayerResume(playerid, time)
{
AFK[playerid] = 0;
return 1;
}
Re: l'm sad bug /admins "AFK" -
Tween73 - 03.03.2017
l'm bug much sad...
Re: l'm sad bug /admins "AFK" -
JessThompson - 03.03.2017
*rolls eyes* I can't help you if you don't understand what I'm saying :P
Re: l'm sad bug /admins "AFK" -
Tween73 - 03.03.2017
Helpme