command only works for leader
#1

pawn Код:
if(strcmp(cmd,"/makeog",true)==0)
    {
    if(PlayerData[playerid][GSLeader] != 1 && PlayerData[playerid][SBFLeader] != 1 && PlayerData[playerid][TDFLeader] != 1 && PlayerData[playerid][IBLeader] != 1 && PlayerData[playerid][JBLeader] != 1 && PlayerData[playerid][KTBLeader] != 1 && PlayerData[playerid][VLeader] != 1 && PlayerData[playerid][VariosLeader] != 1 && PlayerData[playerid][TDBLeader] != 1 &&
    PlayerData[playerid][GSco] != 1 && PlayerData[playerid][SBFco] != 1 && PlayerData[playerid][TDFco] != 1 && PlayerData[playerid][IBco] != 1 && PlayerData[playerid][JBco] != 1 && PlayerData[playerid][KTBco] != 1 && PlayerData[playerid][Vco] != 1 && PlayerData[playerid][Variosco] != 1 && PlayerData[playerid][TDBco] != 1) return SendClientMessage(playerid,ORANGE,"** You are not a Gang Leader or Co Leader!");
    {
    }
    if(strlen(tmp) == 0) return SendClientMessage(playerid, ORANGE, "** Correct Usage - /MakeOG [ playerid ]");
    {
    if(PlayerData[playerid][GSLeader] == 1 && PlayerData[playerid][GSco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][GSOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given Grove Street Families OG rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    return 1;
    }
    else if(PlayerData[playerid][SBFLeader] == 1 && PlayerData[playerid][SBFco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][SBFOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given the Seville Boulevard Families OG Rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    }
    else if(PlayerData[playerid][TDFLeader] == 1 && PlayerData[playerid][TDFco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][TDFOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given the Temple Drive Families OG Rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    }
    else if(PlayerData[playerid][IBLeader] == 1 && PlayerData[playerid][IBco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][IBOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given the Front Yard Ballas OG Rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    }
    else if(PlayerData[playerid][JBLeader] == 1 && PlayerData[playerid][JBco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][JBOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given the Rolling Height Ballas OG Rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    }
    else if(PlayerData[playerid][KTBLeader] == 1 && PlayerData[playerid][KTBco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][KTBOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given the Kilo Tray Ballas OG Rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    }
    else if(PlayerData[playerid][VLeader] == 1 || PlayerData[playerid][Vco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][VOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given the East Beach Vagos OG Rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    }
    else if(PlayerData[playerid][VariosLeader] == 1 && PlayerData[playerid][Variosco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][VariosOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given the El Corona Aztecas OG Rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    }
    else if(PlayerData[playerid][TDBLeader] == 1 && PlayerData[playerid][TDBco] == 1)
    {
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][TDBOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given the Temple Drive Ballas OG Rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    }
    return 1;
    }
}
Can you boys tell me why the command only works for the leader?

For the leader it works fine, but when you type it being the co leader nothing happens, no messages nothing.
Reply
#2

pawn Код:
if(strcmp(cmd,"/gsco",true)==0)
{
      PlayerData[playerid][GSco] = 1;
}
Reply
#3

I already got a command to make players co leaders, the problem is that when a co leader wants to use /makeog, nothing happens
Reply
#4

pawn Код:
if(PlayerData[playerid][GSLeader] == 1 && PlayerData[playerid][GSco] == 1)
Change && to ||

pawn Код:
if(PlayerData[playerid][GSLeader] == 1 || PlayerData[playerid][GSco] == 1)
Reply
#5

Already tried, still only works for leader
Reply
#6

so whats the answer
Reply
#7

Try replacing this code:

pawn Код:
if(PlayerData[playerid][GSLeader] == 0 && PlayerData[playerid][GSco] == 0) return 1;
else
{
    new otherplayerid;
    otherplayerid = strval(tmp);
    PlayerData[otherplayerid][GSOG] = 1;
    SendClientMessage(otherplayerid,ORANGE, "** You have been given Grove Street Families OG rights");
    SendClientMessage(otherplayerid,ORANGE, "** Now you are able to use AK47 and Shotgun.");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)