04.08.2012, 21:14
Hello, I got an stevo's CNR Server i've changed cia to isr
now the /adisr command doesnt work in-game
here is the code for both /adisr and /adunisr:
please help me
now the /adisr command doesnt work in-game
here is the code for both /adisr and /adunisr:
Код:
dcmd_adisr(playerid,params[])
{
new string[128];
new ID;
if(sscanf(params,"ui",ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adisr (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 ISR 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 ISR status.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(CanUseISR[ID] == 1337)
{
format(string,sizeof(string),"%s(%d) is already a ISR member.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
format(string,sizeof(string),"[ADMIN ISR] Administrator has given %s(%d) ISR status.",PlayerName(ID),ID);
SendClientMessageToAll(COLOR_ADMIN,string);
SendClientMessage(ID,COLOR_ADMIN,"You have been given ISR status by a Server Administrator. Congratulations.");
CanUseISR[ID] =1337;
format(string,sizeof(string),"9[ADMIN ISR] Administrator has given %s(%d) ISR status.",PlayerName(ID),ID);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
dcmd_adunisr(playerid,params[])
{
new string[128];
new ID;
if(sscanf(params,"ui",ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adunisr (Player Name/ID)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot take their ISR 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 take their ISR status.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(CanUseISR[ID] != 1337)
{
format(string,sizeof(string),"%s(%d) is not a ISR member.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
format(string,sizeof(string),"[ADMIN UNISR] Administrator has taken %s(%d)'s ISR status.",PlayerName(ID),ID);
SendClientMessageToAll(COLOR_ADMIN,string);
SendClientMessage(ID,COLOR_ADMIN,"Your ISR status has been taken away from you by a Server Administrator. Unlucky.");
CanUseISR[ID] =0;
format(string,sizeof(string),"9[ADMIN UNISR] Administrator has taken %s(%d)'s ISR status.",PlayerName(ID),ID);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}

