/pm for DCMD
#1

Hello guys.. i'd appreciate it if some one will give me a /pm cmd for DCMD
Reply
#2

Use the search functions and find some filterscripts. Look to it and implent it.
Reply
#3

pawn Код:
dcmd_pm(playerid,params[])
{
    new tmp[256], idx, string[256],player1, pid[256];
    pid = strtok(params, idx); tmp = strtok(params, idx);
    if(!strlen(pid) || !strlen(tmp)) return SendClientMessage(playerid,red,"Usage: /pm [ID] [message]");
    player1=strval(pid);
    if(IsPlayerConnected(player1))
    {
        format(string,sizeof(string), "PM from %s (ID:%d): %s", pName(playerid),playerid, params[strlen(pid)+1]);
        SendClientMessage(player1,0xFFDC18FF,string);
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(player1, X,Y,Z);
        PlayerPlaySound(player1, 1058, X, Y, Z);
        format(string,sizeof(string), "PM sent to %s (ID:%d): %s", pName(player1),player1, params[strlen(pid)+1]);
        SendClientMessage(playerid,0xFFDC18FF,string);
        format(string, sizeof(string), "***PM: %s To %s: %s", pName(playerid), pName(player1), params[strlen(pid)+1]);
        print(string);
        if(IsPlayerNPC(player1))
        {
            format(string,sizeof(string), "PM from %s (ID:%d): Hello %s, I'm a bot and I won't answer you.", pName(player1),player1, pName(playerid));
            SendClientMessage(playerid,0xFFDC18FF,string);
            print(string);
            GetPlayerPos(playerid, X,Y,Z);
            PlayerPlaySound(playerid, 1058, X, Y, Z);
        }
    }
    else return SendClientMessage(playerid,red,"ERROR: This player is not connected.");
    return 1;
}
Have fun!

Greetings,
Jeffry
Reply
#4

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
pawn Код:
dcmd_pm(playerid,params[])
{
    new tmp[256], idx, string[256],player1, pid[256];
    pid = strtok(params, idx); tmp = strtok(params, idx);
    if(!strlen(pid) || !strlen(tmp)) return SendClientMessage(playerid,red,"Usage: /pm [ID] [message]");
    player1=strval(pid);
    if(IsPlayerConnected(player1))
    {
        format(string,sizeof(string), "PM from %s (ID:%d): %s", pName(playerid),playerid, params[strlen(pid)+1]);
        SendClientMessage(player1,0xFFDC18FF,string);
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(player1, X,Y,Z);
        PlayerPlaySound(player1, 1058, X, Y, Z);
        format(string,sizeof(string), "PM sent to %s (ID:%d): %s", pName(player1),player1, params[strlen(pid)+1]);
        SendClientMessage(playerid,0xFFDC18FF,string);
        format(string, sizeof(string), "***PM: %s To %s: %s", pName(playerid), pName(player1), params[strlen(pid)+1]);
        print(string);
        if(IsPlayerNPC(player1))
        {
            format(string,sizeof(string), "PM from %s (ID:%d): Hello %s, I'm a bot and I won't answer you.", pName(player1),player1, pName(playerid));
            SendClientMessage(playerid,0xFFDC18FF,string);
            print(string);
            GetPlayerPos(playerid, X,Y,Z);
            PlayerPlaySound(playerid, 1058, X, Y, Z);
        }
    }
    else return SendClientMessage(playerid,red,"ERROR: This player is not connected.");
    return 1;
}
Have fun!

Greetings,
Jeffry
doesn't works :SSS
Reply
#5

Quote:
Originally Posted by ThePandaDK
Посмотреть сообщение
doesn't works :SSS
Sir, what does not work?
I have copied this from an old code of mine.

Can you explain the problem?
Reply
#6

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
Sir, what does not work?
I have copied this from an old code of mine.

Can you explain the problem?
idk.. i placed it somewhere.. logged in game typed /pm and didn't work :S
Reply
#7

Do you even know what the hell you are even doing?
Reply
#8

If you have no idea what you're doing go read some tutorials or the wiki, this isn't a request board.
Reply
#9

Do you know how to create some normal commands? /help, /commands try to understand ZCMD/DCMD whatever you are using.
Reply
#10

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
Do you know how to create some normal commands? /help, /commands try to understand ZCMD/DCMD whatever you are using.
No i don't... dude if you don't want to help me you don't have to.
but if you do, at least do it with a nice attitude otherwise
you'r free to go.. don't have to be here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)