Simple PM [LINK UPDATED] -
Tanush123 - 11.08.2011
Simple PM By Tanush
Hey guys i made /pm [id] [message] for people that doesn't know how to make /pm. I used zcmd and sscanf for this.
Special Thanks to Zeex (ZCMD)
Another Thanks to ****** (sscanf)
Fixed the problem find by CyperGhost
PasteBin >>
http://pastebin.com/5Yv7QUig
Download >>
http://www.mediafire.com/?n0620ciwhi0nc69
Guys if you see bugs just don't try to avoid it, tell me so i could fix it next update.
Re: Simple PM -
misho1 - 11.08.2011
Nice
Re: Simple PM -
[bs]_lancer - 11.08.2011
Nice And Cool
Re: Simple PM -
Cosmo Bulthuis - 11.08.2011
DELETED
Re: Simple PM -
Tanush123 - 11.08.2011
Quote:
Originally Posted by Cosmo Bulthuis
It's simple and nice! 7.5/10
|
thanks why not 10/10 xD?
Re: Simple PM -
Laronic - 11.08.2011
pawn Код:
CMD:pm(playerid, params[])
{
if(togglepm[ID] == 0) return SendClientMessage(playerid,0xff0000ff,"ERROR: That user has is pm to toggle off");
if(sscanf(params,"us",ID,message)) return SendClientMessage(playerid,0xFF9900AA,"USAGE: /pm [ID] [message]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,0xFF0000FF,"That user is not connected.");
GetPlayerName(ID,Pname,sizeof(Pname));
GetPlayerName(playerid,Nam,sizeof(Nam));
format(str,sizeof(str),"You had send a message to %s",Pname);
SendClientMessage(playerid,0xFF9900AA,str);
format(str,sizeof(str),"%s Send you a PM: %s",Nam,message);
SendClientMessage(ID,0xFF9900AA,str);
return 1;
}
pawn Код:
//You have this before the sscanf line.. so im pretty sure the 'ID' will return as 0
if(togglepm[ID] == 0)
Re: Simple PM -
Tanush123 - 11.08.2011
togglepm works, it doesnt return as 0... it says ERROR: that person has toggle pm off if someone has it off
Re: Simple PM -
Laronic - 11.08.2011
Try to run a test, use printf
pawn Код:
CMD:pm(playerid, params[])
{
if(togglepm[ID] == 0) return SendClientMessage(playerid,0xff0000ff,"ERROR: That user has is pm to toggle off");
printf("Player ID: %d", ID);
if(sscanf(params,"us",ID,message)) return SendClientMessage(playerid,0xFF9900AA,"USAGE: /pm [ID] [message]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,0xFF0000FF,"That user is not connected.");
GetPlayerName(ID,Pname,sizeof(Pname));
GetPlayerName(playerid,Nam,sizeof(Nam));
format(str,sizeof(str),"You had send a message to %s",Pname);
SendClientMessage(playerid,0xFF9900AA,str);
format(str,sizeof(str),"%s Send you a PM: %s",Nam,message);
SendClientMessage(ID,0xFF9900AA,str);
return 1;
}
My results:
/pm 0 hi
/pm 1 hey
/pm 2 hello there
Код:
Player ID: 0
Player ID: 0
Player ID: 0
As you can see it always return 0, no matter ID you send the pm to
Re: Simple PM -
KeeDee - 18.08.2011
Simple but nice.
Re: Simple PM -
Kerlan - 19.11.2011
I need an IRC channel i don't know much about it thou
Re: Simple PM - Astralis - 20.11.2011
simple and easy but nice.
Re: Simple PM -
Tanush123 - 08.12.2011
Thank you guys
Re: Simple PM -
KingHual - 08.12.2011
Quote:
Originally Posted by Kerlan
I need an IRC channel i don't know much about it thou
|
what the fuck has that got to do with the topic? Also, this is another one of those pm systems. I would always prefer garpm over this
Re: Simple PM -
Tanush123 - 08.12.2011
GarPM doesnt exist now, garsion delete his account i think
Re: Simple PM -
davve95 - 09.12.2011
Sounds nice I think I will use it for my server..
Edit: Downlod link don't work.
Re: Simple PM -
Tanush123 - 09.12.2011
I fixed the download link, if you get that problem again just reply again that download link is not working then copy the pastebin
AW: Re: Simple PM -
Region123 - 05.01.2012
Quote:
Originally Posted by CyberGhost
Try to run a test, use printf
pawn Код:
CMD:pm(playerid, params[]) { if(togglepm[ID] == 0) return SendClientMessage(playerid,0xff0000ff,"ERROR: That user has is pm to toggle off"); printf("Player ID: %d", ID); if(sscanf(params,"us",ID,message)) return SendClientMessage(playerid,0xFF9900AA,"USAGE: /pm [ID] [message]"); if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,0xFF0000FF,"That user is not connected."); GetPlayerName(ID,Pname,sizeof(Pname)); GetPlayerName(playerid,Nam,sizeof(Nam)); format(str,sizeof(str),"You had send a message to %s",Pname,message); // <<<< He forgot the message. -_- SendClientMessage(playerid,0xFF9900AA,str); format(str,sizeof(str),"%s Send you a PM: %s",Nam,message); SendClientMessage(ID,0xFF9900AA,str); return 1; }
My results:
/pm 0 hi
/pm 1 hey
/pm 2 hello there
Код:
Player ID: 0
Player ID: 0
Player ID: 0
As you can see it always return 0, no matter ID you send the pm to
|
Fixed for you
Re: AW: Re: Simple PM -
Tanush123 - 05.01.2012
Quote:
Originally Posted by Region123
Fixed for you 
|
dude i forgot about that and fixed it long time
Re: Simple PM -
Notis123 - 05.01.2012
Me gelly fag

I wanted to release one but People pwn me :P
Re: Simple PM -
davve95 - 12.01.2012
I downloaded it today and tryd it very good!