[Include] Multi Private Messages (v0.5) - Include (New Abilities)
#1

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!

Reply
#2

You sure its a include not a FS ?? Btw good work
Reply
#3

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!
Reply
#4

Good JoB done.
Reply
#5

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?
Reply
#6

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.
Reply
#7

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.
Reply
#8

It's Multi PM.
Use like: /Pm 1,2,5,9,44 When we go to park?
Reply
#9

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.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)