/pm not working
#4

pawn Код:
if(!strcmp("/pm", cmdtext, true))
{
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /PM [playerid] [text]");
    new player1 = strval(tmp), text = strrest(cmdtext, idx), playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
    if(!strlen(text)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /PM [playerid] [text]");
    if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, COLOR_YELLOW, "That player is not connected!");
    GetPlayerName(player1, playername, sizeof(playername));
    GetPlayerName(playerid, adminname, sizeof(adminname));
    format(string, sizeof(string), ">> (PM) To %s:  %s", playername, player1, text);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "<< (PM) From %s:  %s", adminname, playerid, text);
    SendClientMessage(player1, COLOR_YELLOW, string);
    printf("%s has PMed: %s(%s)", adminname, playername, text);
    return 1;
}
Reply


Messages In This Thread
/pm not working - by geerdinho8 - 09.01.2012, 17:54
Re: /pm not working - by Face9000 - 09.01.2012, 17:55
Re: /pm not working - by myandyou - 09.01.2012, 18:37
Re: /pm not working - by Konstantinos - 09.01.2012, 18:49
Re: /pm not working - by geerdinho8 - 10.01.2012, 18:19
Re: /pm not working - by myandyou - 10.01.2012, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)