[FilterScript] Simple Pm System
#1

Simple PM System 1.0v




Simple /pm Command To Send Private Message To PLAYER!







Credits \:


[EDG]aggel_paok[ENS] Me ..




IF YOU LOOK A BUG REPORT IT IN THE REPLY PLEASE!
Downloads

PasteBin: http://pastebin.com/xWtWnsrS


Sorry For My Bad English
Reply
#2

Код:
ocmd:pm(playerid,params[])
{
	new pID, text[280];
	if(sscanf(params,"us",pID,text))return SendClientMessage(playerid,GELB,"/pm [ID] [Text]");
    if(IsPlayerConnected(pID))
    {
        format(text,sizeof(text),"** %s whispers: %s **",PlayerName(playerid),text);
        SendClientMessage(pID,0xFA00FFFF,text);
        SendClientMessage(playerid,0xFA00FFFF,text);
    }
	return 1;
}
50 times shorter?
Reply
#3

Thanks you.
But i like mine:
pawn Код:
if(!strcmp(cmd,"/PrivateMessage",true) || !strcmp(cmd,"/Pm",true))
{
    cmd = strtok(cmdtext, idx);
    if(!strlen(cmd)) return SendClientMessage(playerid, COLOR_WHITE, "/Pm [Id/Name] [Message] :щйоещ");
    id = strval(cmd);
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED,"! дщзчп ма озебш");
    if(playerid == id) return SendClientMessage(playerid, COLOR_RED, "! аъд ма йлем мщмез дегтеъ фшийеъ мтцок");
    cmd = strrest(cmdtext, idx);
    if(!strlen(cmd)) return SendClientMessage(playerid, COLOR_WHITE, "/Pm [Id/Name] [Message] :щйоещ");
    if(dini_Int(PlayerFile(playerid),"CanPms") == 0) // Blocked
{
    SendClientMessage(playerid,COLOR_WHITE,"(/Settings зсоъ чбмъ ещмйзъ дегтеъ (шад");
}
    if(dini_Int(PlayerFile(id),"CanPms") == 0) // Blocked
{
    format(string, sizeof(string), ".зесн дегтеъ фшийеъ рлрсеъ \"%s\" дегтък ма рщмзд офрй щдщзчп", GetName(id));
    SendClientMessage(playerid, COLOR_YELLOW, string);
}
    else
{
    format(string, sizeof(string), "[PM] « OUT %s (%d): %s", GetName(id), id, cmd);
    SendClientMessage(playerid, COLOR_AQUA, string);
    format(string, sizeof(string), "[PM] » IN %s (%d): %s", GetName(playerid), playerid, cmd);
    SendClientMessage(id, COLOR_YELLOW, string);
}
return 1;
}
Reply
#4

Pastebin link?
Reply
#5

Quote:
Originally Posted by _DownLoaD_
Посмотреть сообщение
Thanks you.
But i like mine:
pawn Код:
if(!strcmp(cmd,"/PrivateMessage",true) || !strcmp(cmd,"/Pm",true))
{
    cmd = strtok(cmdtext, idx);
    if(!strlen(cmd)) return SendClientMessage(playerid, COLOR_WHITE, "/Pm [Id/Name] [Message] :щйоещ");
    id = strval(cmd);
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED,"! дщзчп ма озебш");
    if(playerid == id) return SendClientMessage(playerid, COLOR_RED, "! аъд ма йлем мщмез дегтеъ фшийеъ мтцок");
    cmd = strrest(cmdtext, idx);
    if(!strlen(cmd)) return SendClientMessage(playerid, COLOR_WHITE, "/Pm [Id/Name] [Message] :щйоещ");
    if(dini_Int(PlayerFile(playerid),"CanPms") == 0) // Blocked
{
    SendClientMessage(playerid,COLOR_WHITE,"(/Settings зсоъ чбмъ ещмйзъ дегтеъ (шад");
}
    if(dini_Int(PlayerFile(id),"CanPms") == 0) // Blocked
{
    format(string, sizeof(string), ".зесн дегтеъ фшийеъ рлрсеъ \"%s\" дегтък ма рщмзд офрй щдщзчп", GetName(id));
    SendClientMessage(playerid, COLOR_YELLOW, string);
}
    else
{
    format(string, sizeof(string), "[PM] « OUT %s (%d): %s", GetName(id), id, cmd);
    SendClientMessage(playerid, COLOR_AQUA, string);
    format(string, sizeof(string), "[PM] » IN %s (%d): %s", GetName(playerid), playerid, cmd);
    SendClientMessage(id, COLOR_YELLOW, string);
}
return 1;
}
I will use that
Reply
#6

Very nice script! Good job!
Reply
#7

Good Job
Reply
#8

YOU DON'T NEED TO WRITE LIKE THAT!!
Reply
#9

OMG What is this
Reply
#10

Come on, Hold the PM Script easy and fine...
Код:
CMD:pm(playerid, cmdtext[])
{
    new
        idx = strfind(cmdtext, " ", true);
    if((cmdtext[0] == EOS) || ((cmdtext[0] == '\1') && (cmdtext[1] == EOS)) || (idx == -1)) {
        SendClientMessage(playerid,COLOR_RED,"Usage: /pm [ID] [MESSAGE]");
        return 1;
    }
    if(cmdtext[idx + 1] == EOS) {
        SendClientMessage(playerid,COLOR_RED,"Usage: /pm [ID] [MESSAGE]");
        return 1;
    }
    cmdtext[idx++] = EOS;
    new
        id = strval(cmdtext);
    if(!IsPlayerConnected(id)) {
        SendClientMessage(playerid,COLOR_RED,"/pm : Wrong Player ID");
        return 1;
    }
    if(playerid == id) {
        SendClientMessage(playerid,COLOR_RED,"You cannot PM yourself.");
        return 1;
    }
    new
        string[256];
    GetPlayerName(id, string, MAX_PLAYER_NAME);
    format(string, sizeof string, "[PM] Message send to %s(%d): %s", string, id, cmdtext[idx]);
    SendClientMessage(playerid, COLOR_RED, string);

    GetPlayerName(playerid, string, MAX_PLAYER_NAME);
    format(string, sizeof string, "[PM] Message from %s(%d): %s", string, playerid, cmdtext[idx]);
    SendClientMessage(id, COLOR_RED, string);
    PlayerPlaySound(id, 1057, 0.0, 0.0, 0.0);

    printf("PM: %s", cmdtext[idx]);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)