How would I do this?
#1

Currently I have a filterscript made for my factions, and I want to know why this isn't working.
pawn Код:
CMD:setleader(playerid, params[])
    {
    //if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"rcon");
    if(pInfo[playerid][pAdmin] => 2);
    {
    new ID,orgid;
    if (sscanf(params, "ud", ID,orgid)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /setleader [playerid] [orgid]");
    if (!IsPlayerConnected(ID)) return 1;
    if (PlayerOrg[ID]) return SendClientMessage(playerid, COLOR_RED,"That player already belongs to an organization");
    if (orgid < 1 || orgid > OrgsCount) return SendClientMessage(playerid, COLOR_RED,"Invalid org. ID!");
    new string[140];
    format(string,sizeof(string),"Admin %s has made you leader of the faction %s!", PlayerName(playerid), GetOrgName(orgid));
    SendClientMessage(ID, COLOR_YELLOW, string);
    format(string,sizeof(string),"You have set %s the leader of %s", PlayerName(ID), GetOrgName(orgid));
    SendClientMessage(playerid, COLOR_YELLOW, string);
    PlayerOrg[ID] = orgid;
    PlayerLeader[ID] = 1;
    Organization[orgid][Leader] = PlayerName(ID);
    SaveLeaders();
    SavePlayerOrgInfo(ID);
    GiveOrgFeatures(ID);
    }
    return 1;
    }
The line "if(pInfo[playerid][pAdmin] => 2);" is an undefined symbol when compiling, but it's not in my main script. How can I make this work?
Reply


Messages In This Thread
How would I do this? - by HenrySunseri - 24.07.2014, 16:54
Re: How would I do this? - by LivingLikeYouDo - 24.07.2014, 17:00
Re: How would I do this? - by HenrySunseri - 24.07.2014, 17:02
Re: How would I do this? - by LivingLikeYouDo - 24.07.2014, 17:30
Re: How would I do this? - by Stinged - 24.07.2014, 18:27
Re: How would I do this? - by HenrySunseri - 24.07.2014, 21:50
Re: How would I do this? - by Stinged - 24.07.2014, 21:56
Re: How would I do this? - by Threshold - 24.07.2014, 22:54
Re: How would I do this? - by Stinged - 24.07.2014, 23:04

Forum Jump:


Users browsing this thread: 1 Guest(s)