Simple Question
#4

is this r ight? i was looking around:

pawn Код:
dcmd_makeleader(playerid, params[])
{
    new
        giveplayerid,
        factionid,
        string[128];
    if (sscanf(params, "ud", giveplayerid, factionid)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /makeleader [playerid/partname] [factionid]");
    else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
    else
    {
        if(factionid <= 14)
        {
            PlayerInfo[giveplayerid][pMemberF] = factionid;
            format(string, sizeof(string), "An admin has set your faction to factionid %d.", PlayerInfo[playerid][pMemberF]);
            SendClientMessage(playerid, COLOR_GREEN, string);
        }
        else if(factionid >= 14)
        {
            SendClientMessage(playerid, COLOR_GREEN, "The Factionid needs to be between 14 and 0 !");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Simple Question - by DaRealz - 24.06.2011, 17:11
Re: Simple Question - by Calgon - 24.06.2011, 17:19
Re: Simple Question - by DaRealz - 24.06.2011, 17:55
Re: Simple Question - by DaRealz - 24.06.2011, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)