SA-MP Forums Archive
/pm for DCMD - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /pm for DCMD (/showthread.php?tid=275911)



/pm for DCMD - DannySnoopy - 11.08.2011

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


Re: /pm for DCMD - Kingunit - 11.08.2011

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


Re: /pm for DCMD - Jeffry - 11.08.2011

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


Re: /pm for DCMD - DannySnoopy - 11.08.2011

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


Re: /pm for DCMD - Jeffry - 11.08.2011

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?


Re: /pm for DCMD - DannySnoopy - 11.08.2011

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


Re: /pm for DCMD - Scenario - 11.08.2011

Do you even know what the hell you are even doing?


Re: /pm for DCMD - PrawkC - 11.08.2011

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


Re: /pm for DCMD - Kingunit - 11.08.2011

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


Re: /pm for DCMD - DannySnoopy - 11.08.2011

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.