12.12.2013, 17:10
Hey guys.
When i use /adcia [id] like /adcia 1, it says
The player ID 84 is not connected to the server. You cannot give them CIA status.
What's going on ? i used /adcia 1 not /adcia 84, what's wrong with that?
Here is the command code.
When i use /adcia [id] like /adcia 1, it says
The player ID 84 is not connected to the server. You cannot give them CIA status.
What's going on ? i used /adcia 1 not /adcia 84, what's wrong with that?
Here is the command code.
PHP код:
dcmd_adcia(playerid,params[])
{
new string[128];
new ID;
if(sscanf(params,"ui",ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adcia (Player Name/ID)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot give them CIA status.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(PLAYERLIST_authed[ID] != 1)
{
format(string,sizeof(string),"%s(%d) is not logged into to the server. You must wait till they login before you give them CIA status.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(CanUseCIA[ID] == 1337)
{
format(string,sizeof(string),"%s(%d) is already a CIA member.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
format(string,sizeof(string),"[ADMIN CIA] Administrator has given %s(%d) CIA status.",PlayerName(ID),ID);
SendClientMessageToAll(COLOR_ADMIN,string);
SendClientMessage(ID,COLOR_ADMIN,"You have been given CIA status by a Server Administrator. Congratulations.");
CanUseCIA[ID] =1337;
format(string,sizeof(string),"9[ADMIN CIA] Administrator has given %s(%d) CIA status.",PlayerName(ID),ID);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}