3 Things (maybe easy)
#8

I've made it using zcmd and sscanf:

pawn Код:
CMD:pm(playerid, params[])
{
        new PID, pName[MAX_PLAYER_NAME];
        if(sscanf(params, "us[128]", PID, params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /pm [playerid] [message]");
        if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
        new Str[128];
        GetPlayerName(PID, pName, sizeof(pName));
        format(Str, sizeof(Str), "Admin says: %s", Sender, params);
        SendClientMessage(PID, COLOR_WHITE, Str);
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
    }
    return 1;
}
Reply


Messages In This Thread
3 Things (maybe easy) - by Alex_Obando - 09.07.2011, 15:24
Re: 3 Things (maybe easy) - by Hipflop - 09.07.2011, 15:29
Respuesta: Re: 3 Things (maybe easy) - by Alex_Obando - 09.07.2011, 15:36
Re: 3 Things (maybe easy) - by Hipflop - 09.07.2011, 15:44
Respuesta: 3 Things (maybe easy) - by Alex_Obando - 09.07.2011, 15:52
Re: 3 Things (maybe easy) - by Hipflop - 09.07.2011, 15:58
Re: 3 Things (maybe easy) - by FireCat - 09.07.2011, 16:01
Re: 3 Things (maybe easy) - by Kush - 09.07.2011, 16:23
Respuesta: 3 Things (maybe easy) - by Alex_Obando - 09.07.2011, 16:34

Forum Jump:


Users browsing this thread: 2 Guest(s)