[Need help] Make /badge cmd for Police Department
#3

Quote:
Originally Posted by Strier
Посмотреть сообщение
pawn Код:
CMD:badge(playerid, params[])
{
    new
        string[128],
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(IsACop(playerid))
    {
if(!PlayerInfo[playerid][pFacDuty])
                    {
                        PlayerInfo[playerid][pFacDuty] = 1;
                        SetPlayerColor(playerid, TRANSPARENT_BLUE);
                        format(string, sizeof(string), "* %s grabs their badge, gun and mp5 from the locker.", RPN(playerid));
                        SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                        GiveZaiatWeapon(playerid, 29, 500);
                        GiveZaiatWeapon(playerid, 24, 200);
                        SetPlayerArmour(playerid, 100);
                        return 1;
                    }
                    else
                    {
                        PlayerInfo[playerid][pFacDuty] = 0;
                        SetPlayerColor(playerid, TRANSPARENT_WHITE);
                        SetPlayerArmour(playerid, 0);
                        format(string, sizeof(string), "* %s places their badge in the locker.", RPN(playerid));
                        SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                       
                    }
                    }
return 1;
}
Somewhere in your script there is a "new badge" wich you're not using, remove it or keep it, it wont cause any damage anyway.
Thank you but ...

Quote:

E:\zGamingRoleplay\gamemodes\ZRP.pwn(12556) : error 001: expected token: "-identifier-", but found "if"
E:\zGamingRoleplay\gamemodes\ZRP.pwn(12580) : warning 217: loose indentation

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)