samp /pm command
#10

pawn Код:
CMD:sms(playerid, params[])
{
    new text[128], number;
    if(sscanf(params, "iz", number, text)) return SendClientMessage(playerid, -1, "USAGE: /SMS [Number] [Text]");
    else
    {  
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(!strcmp(number, PlayerData[i][Numeris]))
            {
                                new string[128];
                format(string, sizeof(string), "SMS Sent to %s: %s", GetName(i), text);
                SendClientMessage(playerid, -1, string);

                format(string, sizeof(string), "SMS From %s: %s", GetName(playerid), text);
                SendClientMessage(i, -1, string);
            }
            else
            {
                SendClientMessage(playerid, -1, "**BEEP** It seems that number doesn't exist **BEEP**");
            }
        }

    }
    return 1;
}

stock GetName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
Reply


Messages In This Thread
samp /pm command - by TheNerka - 28.08.2014, 18:31
Re: samp /pm command - by Abagail - 28.08.2014, 18:39
Re: samp /pm command - by TheNerka - 28.08.2014, 18:43
Re: samp /pm command - by TheNerka - 29.08.2014, 06:09
Re: samp /pm command - by Ox1gEN - 29.08.2014, 06:36
Re: samp /pm command - by TheNerka - 29.08.2014, 06:49
Re: samp /pm command - by AroseKhanNiazi - 29.08.2014, 09:23
Re: samp /pm command - by Ox1gEN - 29.08.2014, 10:11
Re: samp /pm command - by TheNerka - 29.08.2014, 10:50
Re: samp /pm command - by Thogy - 29.08.2014, 10:59

Forum Jump:


Users browsing this thread: 4 Guest(s)