Argument type mismatch type 1 help
#3

How do i make this:

pawn Code:
COMMAND:kick(playerid, params[])
{
    new targetid, string[128], szName[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        if(sscanf(params, "us[128]", targetid, string)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /kick [playerid] [reason]");
        if(IsPlayerConnected(targetid))
        {
            new szMessage[128], szMessage2[128];
            GetPlayerName(playerid, szName, sizeof szName);
            format(szMessage,sizeof szMessage,"AdmCmd: %s, has kicked %s reason: %s",szName, string);
            format(szMessage2,sizeof szMessage2,"Admin: %s, has has kicked you, reason: %s",szName, string);
            SendAdminMessage(COLOR_YELLOW,szMessage);
            SendClientMessage(targetid, COLOR_YELLOW, szMessage2);
            Kick(targetid);
            return 1;
        }
        else
            return SendClientMessage(playerid, COLOR_RED, "This player is not online."), 1;
    }
    return 1;
}
Get the players name that the admin will kick too?

"AdmCmd: %s, has kicked %s reason: %s"
Reply


Messages In This Thread
Argument type mismatch type 1 help - by gnoomen2 - 07.10.2012, 04:44
Respuesta: Argument type mismatch type 1 help - by WCrimson - 07.10.2012, 04:50
Re: Argument type mismatch type 1 help - by gnoomen2 - 07.10.2012, 16:53
Re : Re: Argument type mismatch type 1 help - by yusei - 07.10.2012, 17:13
Re: Argument type mismatch type 1 help - by gnoomen2 - 07.10.2012, 17:26
Re : Re: Argument type mismatch type 1 help - by yusei - 07.10.2012, 17:39
Re: Argument type mismatch type 1 help - by gnoomen2 - 07.10.2012, 17:44

Forum Jump:


Users browsing this thread: 2 Guest(s)