Bug in weaponall
#1

Hallo allemaal,

Ik heb een command voor admins: /minigunall maar niet niemand krijgt de minigun, behalve de admin zelf die de command gebruikte. Wat is er fout aan dan? Hier is het command gedeelte:

pawn Code:
CMD:minigunall(playerid, params[])
{
    new str[128];
    if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "** You are not logged in, please login first.");
    if(PlayerAcc[playerid][Admin] == 0) return SendClientMessage(playerid, -1,""orange"** Sorry, only admins level 4+ can do that command.");
    if(PlayerAcc[playerid][Admin] >= 4)
    {
        GivePlayerWeapon(playerid, 38, 9000);
        format(str, sizeof(str), "~y~minigun ~r~kill ~y~time!");
        GameTextForAll(str, 4000, 3);
        PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
        foreach(Player, i)
        {
            if(IsPlayerConnected(i) && (i != playerid) && (PlayerAcc[playerid][Admin] < PlayerAcc[i][Admin]))
            {
                GivePlayerWeapon(playerid, 38, 9000);
            }
        }
        format(str, sizeof(str), "** Admin %s(ID:%d) gave everyone a minigun.", GetName(playerid), playerid);
        SendClientMessageToAll(COLOR_YELLOW, str);
        format(str, sizeof(str), "** You gave everyone a minigun.");
        SendClientMessage(playerid, COLOR_YELLOW, str);
    }
    else return ErrorMessages(playerid, 5);
    return 1;
}
//----
Reply


Messages In This Thread
Bug in weaponall - by mickos - 23.01.2014, 09:27
Re: Bug in weaponall - by Rzzr - 23.01.2014, 10:18
Re: Bug in weaponall - by mamorunl - 23.01.2014, 11:00
Re: Bug in weaponall - by Henkie - 23.01.2014, 12:37
Re: Bug in weaponall - by Danny - 23.01.2014, 13:29
Re: Bug in weaponall - by mickos - 23.01.2014, 13:40
Re: Bug in weaponall - by mamorunl - 23.01.2014, 14:02
Re: Bug in weaponall - by Hiddos - 23.01.2014, 14:44
Re: Bug in weaponall - by Henkie - 23.01.2014, 16:02
Re: Bug in weaponall - by Hiddos - 23.01.2014, 19:44

Forum Jump:


Users browsing this thread: 1 Guest(s)