#5

pawn Код:
CMD:pm(playerid, params[])
{
    new str[512], str2[512], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "us", id, str2))
    {
        SendClientMessage(playerid, -1, "USAGE: /pm [ID] [Message]");
        return 1;
    }
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "WARNING: Player is not connected.");
    if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "WARNING: You cannot pm to yourself!");
    {
        GetPlayerName(playerid, Name1, sizeof(Name1));
        GetPlayerName(id, Name2, sizeof(Name2));
        format(str, sizeof(str), "(( PM to [%d] %s: %s ))", id, Name2, str2);
        SendClientMessage(playerid, 0xFFBF00FF, str);
        format(str, sizeof(str), "(( PM from [%d] %s: %s ))", playerid, Name1, str2);
        SendClientMessage(id, 0xFFFF00FF, str);
    }
    return 1;
}
All you need to do is deleting places that you don't have in your script. I did it for you, here you are.
Reply


Messages In This Thread
ZCMD - by Windrush - 24.08.2012, 18:11
Re: ZCMD - by Calabresi - 24.08.2012, 18:12
Re: ZCMD - by Shetch - 24.08.2012, 18:16
Re: ZCMD - by Windrush - 24.08.2012, 18:20
Re: ZCMD - by Calabresi - 24.08.2012, 18:27
Re: ZCMD - by kbalor - 24.08.2012, 18:45
Re: ZCMD - by Windrush - 24.08.2012, 18:59
Re: ZCMD - by leonardo1434 - 24.08.2012, 19:39

Forum Jump:


Users browsing this thread: 1 Guest(s)