SA-MP Forums Archive
ZCMD + /PM - 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: ZCMD + /PM (/showthread.php?tid=269933)



ZCMD + /PM - Coffeemonster - 18.07.2011

Okay, I have tried some stuff but can't get it working. I need a /pm id text command for zcmd :/. I also have the sscanf2 so that can be used if it's easier to do it with it.


Re: ZCMD + /PM - Famalamalam - 18.07.2011

What have you tried so far? Show me some code.


Re: ZCMD + /PM - Coffeemonster - 18.07.2011

Well I tried with some sscanf stuff but It failed, so I deleted all of it already and came here asking for help.


Re: ZCMD + /PM - Famalamalam - 18.07.2011

Well, uh ... have a look around in some game-modes for examples. I'd show you one from my own game-mode but it is very advanced and has lots of stuff in it that's specific to my game-mode only.


Re: ZCMD + /PM - _Aleksandar - 18.07.2011

Код:
CMD:pm(playerid, params[])
{
new id,str[80],txt[80],name[20];
GetPlayerName(playerid, name, 20);
if(sscanf(params,"us[80]",id,txt)) return SendClientMessage(playerid,-1,"Use: /pm [id] [txt]");
format(str,80,"PM,Sender: %s: Txt: %s",name,txt);
SendClientMessage(id,-1,str);
return true;
}
try this


Re: ZCMD + /PM - HyperZ - 18.07.2011

Use this:
pawn Код:
// PM Command.
CMD:pm( playerid, params[ ] )
{
    new pID, Message[129], string[128];
    if(sscanf(params, "us[129]", pID, Message)) return SendClientMessage(playerid, -1, "/pm <id> [message]");
    else
    {
        if(pID == (0xFFFF)) return SendClientMessage(playerid, -1,"Player not connected!");
        if(pID == playerid ) return SendClientMessage(playerid, -1,"You cannot PM yourself!");
        format(string,sizeof(string),"PM Sent To %s (%d): %s", pName(pID), pID, Message);
        SendClientMessage(playerid, -1, string);
        format(string,sizeof(string),"PM From %s (%d): %s", pName(playerid), playerid, Message);
        SendClientMessage(pID, -1, string);
    }
    return 1;
}
// On Bottom of your script.
stock pName(playerid)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    return Name;
}



Re: ZCMD + /PM - =WoR=Varth - 19.07.2011

Or use the filterscript in my siggy.


Re: ZCMD + /PM - Famalamalam - 19.07.2011

Or don't........ Ad clicks are for retards.

Just take my advice. If you really are stuck, PM me and I will help you make one.


Re: ZCMD + /PM - =WoR=Varth - 19.07.2011

Quote:
Originally Posted by Famalamalam
Посмотреть сообщение
Or don't........ Ad clicks are for retards.

Just take my advice. If you really are stuck, PM me and I will help you make one.
Sorry for off topic:
Giving doesn't always mean not hoping for feedback.
And guess what? Yes I'm a retard but it have nothing to do with what you said.


Re: ZCMD + /PM - Famalamalam - 19.07.2011

I'm sorry but I didn't really understand what you said. If you want some off-topic please send me a private message.