PM Command please? - 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)
+--- Thread: PM Command please? (
/showthread.php?tid=484609)
PM Command please? -
PrinceOfPersia - 31.12.2013
Hello
Can any one script for me PM command without errors...
I'm using ZCMD
Thanks.
Anyway I searched but I didn't find it.
Re: PM Command please? -
Jstylezzz - 31.12.2013
This is one of the most basic things one can do in PAWN. Try to learn scripting instead of asking everyone to make stuff for you.
pawn Код:
CMD:pm(playerid,params[])
{
new toplayer, mes[128],out[128], sName[24];
if(sscanf(params,"is[128]",toplayer,mes)) return SendClientMessage(playerid,-1,"Usage: /pm <playerid> <message>");
GetPlayerName(playerid,sName,24);
format(out,sizeof(out),"PM from %s (%d): %s",sName,playerid,mes);
SendClientMessage(toplayer,-1,out);
return 1;
}
If you want to learn and want explanation of the code I wrote, tell me and I'll put comments with info behind the code.