possibly unintended assignment
#3

pawn Код:
CMD:kick(playerid, params[])
{
        if(PlayerInfo[playerid][pVip] < 1) return SendClientMessage(playerid,0xDEEE20FF ,"Not A Vip"
        {
            new PID;
            new reason[64];
            new str[128];
            new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Adminname, sizeof(Adminname));
            GetPlayerName(PID, Playername, sizeof(Playername));
            if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, 0xDEEE20FF, "USAGE: /kick [playerid] [reason]");
            if(!IsPlayerConnected(PID))  return SendClientMessage(playerid, 0xDEEE20FF, "Player is not connected!");
            format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason);
            Kick(PID);
        }
        return 1;
}
Reply


Messages In This Thread
possibly unintended assignment - by Louris - 19.11.2012, 15:46
Re: possibly unintended assignment - by iGetty - 19.11.2012, 15:47
Re: possibly unintended assignment - by Glad2BeHere - 19.11.2012, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)