Multi Private Messages (v0.5) - Include (New Abilities) -
Swimor - 02.10.2012
Multi Private Messages (v0.5) - Include (New Abilities)
First of all, Big thanks to ****** for sscnaf plugin - Amazing!
After two version of this system I converted this to include with new abilities.
Whats New?
[*] Fixed some bugs (like two ,, after name...)
[*] Stop using Split & Explode, converted to sscnaf
[*] Added new callback
[*] Converted to include from filterscript
[*] Added new abilities (like full control on the sending and errors)
ScreenShots
Here some screenshots from the system fully working on 0.3e server:
Download
PasteBin:
http://pastebin.com/f4xNBRF9
MediaFire(Mirror):
http://www.mediafire.com/?60cx3l6654grnhg
* Mirrors will be accepted *
CallBack
In the new version I added new CallBack that names "OnPlayerSendPrivate":
Код:
forward OnPlayerSendPrivate(playerid, text[], bool:recived, reciveid, reciving[], status); //Status 0 = error, 1 = error, 2 = send to recive, 3 = send to sender
Usage Is Simple as seen in "Test script".
Test script
Код:
public OnPlayerSendPrivate(playerid, text[], bool:recived, reciveid, reciving[], status)
{
printf("[PrivateMessage] %s(%d) -> %s(%d): %s [Status: %d]", GetName(playerid), playerid, reciving, reciveid, text, status);
switch(status) {
case 0:
SendClientMessage(playerid, 0xFF0000FF, "Usage: /Pm [ID\\IDs] [Text]"); //send error message
case 1:
SendClientMessage(playerid, 0xFF0000FF, "Wrong ID\\IDs, /Help for help"); //send error message
case 2:
SendClientFormat(reciveid, 0xEAFF00FF, sttr, "[PM] %s(->To You): %s", GetName(playerid), text); //send formated message to players
case 3:
SendClientFormat(playerid, 0xFF00FFFF, sttr, "[PM] %s(->To %s): %s", GetName(playerid), reciving, text); //send formated message to sender
}
return 1;
}
Controlling
In the new version you can fully controll the message sending, accepting, error and more(as seen in the test script).
Just as a reminder: Status 0 = error, 1 = error, 2 = send to recive, 3 = send to sender
Bugs & Suggestions
No bugs known for this time, if you have find a bug write me a private message and I will fix it at the nex version!
Allso Suggestions will be accepted as well.
Enjoy!
Re: Multi Private Messages (v0.5) - Include (New Abilities) -
Black Wolf - 02.10.2012
You sure its a include not a FS ?? Btw good work
Re: Multi Private Messages (v0.5) - Include (New Abilities) -
Swimor - 02.10.2012
Quote:
Originally Posted by Black Wolf
You sure its a include not a FS ?? Btw good work
|
Yes, just include it into your script, add the public and use as you want!
Re: Multi Private Messages (v0.5) - Include (New Abilities) -
Lordzy - 02.10.2012
Good JoB done.
Re: Multi Private Messages (v0.5) - Include (New Abilities) -
Sniper Kitty - 02.10.2012
I was reviewing the code, and your 'hook' makes absolutely no sense.
pawn Код:
#if defined _PMS_OnPlayerCommandText
#undef OnPlayerUpdate
#else
#define _PMS_OnPlayerCommandText
#endif
#define OnPlayerUpdate PMS_OnPlayerCommandText
Why would you turn OnPlayerUpdate into OnPlayerCommandText?
Is it even possible, did you even test this to see if it affected OnPlayerUpdate in the gamemode part?
Re: Multi Private Messages (v0.5) - Include (New Abilities) -
Swimor - 02.10.2012
Quote:
Originally Posted by Sniper Kitty
I was reviewing the code, and your 'hook' makes absolutely no sense.
pawn Код:
#if defined _PMS_OnPlayerCommandText #undef OnPlayerUpdate #else #define _PMS_OnPlayerCommandText #endif #define OnPlayerUpdate PMS_OnPlayerCommandText
Why would you turn OnPlayerUpdate into OnPlayerCommandText?
Is it even possible, did you even test this to see if it affected OnPlayerUpdate in the gamemode part?
|
You right, I will fix this.
Re: Multi Private Messages (v0.5) - Include (New Abilities) - Glint - 02.10.2012
I don't want to be rude but what is so different in this from other PM systems ?
And why in an include ?
It is just PM's send/receive, there is nothing special about it.
I rate 4/10, i gave 4 just for your efforts.
Re: Multi Private Messages (v0.5) - Include (New Abilities) -
Swimor - 02.10.2012
It's
Multi PM.
Use like: /Pm 1,2,5,9,44 When we go to park?
Re: Multi Private Messages (v0.5) - Include (New Abilities) - Glint - 02.10.2012
Quote:
Originally Posted by Swimor
It's Multi PM.
Use like: /Pm 1,2,5,9,44 When we go to park?
|
OK, but why in an include you could of simply made it a Filterscript.
Re: Multi Private Messages (v0.5) - Include (New Abilities) -
Swimor - 02.10.2012
Quote:
Originally Posted by [Lexi]
OK, but why in an include you could of simply made it a Filterscript.
|
This include is raplece for OnPlayerPrivmsg with some news (as i said in the last commat).
Here you have fully controll on your private messages