SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 06/02/2018, 05:38 PM   #1
MarkNelson
Huge Clucker
 
MarkNelson's Avatar
 
Join Date: Feb 2016
Location: Tunisia
Posts: 455
Reputation: 45
Default Simple PM System

Private Messaging system by MarkNelson(hobo101) including some commands and some features

How it works:
Well, this private messaging system doesn't have /pm only, it has some features like /pm and /re. Also, if you want to PM someone faster you can press on TAB then click on the player's name two times after that a dialog with a blank will appear to you, asking you to put your message into that blank and you have two options "Send" or "Cancel".
Let's talk about the /pm, when you pm someone your message will be colored with orange while when you recieve a message from someone, it will be colored with yellow, and if you want to reply him faster, you can use /re [Message] to reply him faster.

System Commands:
- /pm [playerid] [message] to PM the player
- /re [message] to reply the pm faster and easier
- press on TAB then click on the player's name two times after that a dialog with a blank will appear to you, asking you to put your message into that blank and you have two options "Send" or "Cancel".

Bugs:
There are no bugs, and i already fixed them. If you find any bug, feel free to PM me through the forums

Pastebin:
https://pastebin.com/QWPVz7gG
Attached Files
File Type: pwn pmsystem.pwn (4.3 KB, 18 views)
File Type: amx pmsystem.amx (18.2 KB, 9 views)
__________________
Code:
[Filterscript] Mechanic System V0.1 BETA
[Filterscript] Simple PM System
[Filterscript] Mechanic System V0.1 ALPHA (Improved Version)
Please donate here:
paypal.me/Clark783
MarkNelson is offline   Reply With Quote
Old 06/02/2018, 07:07 PM   #2
willbedie
Huge Clucker
 
willbedie's Avatar
 
Join Date: Feb 2016
Location: database/Players
Posts: 217
Reputation: 9
Default Re: Simple PM System

This is a good one
__________________
RETIRED FROM SA-MP.
__________________________


Our server is currently under construction, you may register our forums if you want to know more about it.
The server is going to run on the last SA-MP version, which is 0.3.DL. It has so many features, stay updated on our forums.

FORUM | DISCORD
willbedie is offline   Reply With Quote
Old 06/02/2018, 07:10 PM   #3
HeroDR22
Little Clucker
 
HeroDR22's Avatar
 
Join Date: Jan 2018
Posts: 37
Reputation: 19
Default Re: Simple PM System

Good job +REP
__________________
REP ME AND I WILL REP YOU
HeroDR22 is offline   Reply With Quote
Old 06/02/2018, 07:39 PM   #4
Stev
Big Clucker
 
Join Date: Oct 2013
Location: United Kingdom
Posts: 145
Reputation: 15
Default Re: Simple PM System

The code itself isn't to bad I guess, i couldn't help but notice this.

Code:
CMD:pm(playerid, params[])
{
    new str[175], str2[175], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "us", id, str2))
    {
        SendClientMessage(playerid, COLOR_ORANGE, "Usage: /pm <id> <message>");
        return 1;
    }
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player not connected");
    if(playerid == id) return SendClientMessage(playerid, COLOR_RED, "ERROR: You cannot pm yourself!");
    { // This isn't needed
        GetPlayerName(playerid, Name1, sizeof(Name1));
        GetPlayerName(id, Name2, sizeof(Name2));
        format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
        SendClientMessage(playerid, COLOR_ORANGE, str);
        PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
        format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
        SendClientMessage(id, COLOR_YELLOW, str);
        PlayerPlaySound(id, 1057, 0.0, 0.0, 0.0);
        printf(str);
        LastPm[id] = playerid;
    } // This isn't needed
    return 1;
}
Stev is offline   Reply With Quote
Old 06/02/2018, 07:40 PM   #5
MarkNelson
Huge Clucker
 
MarkNelson's Avatar
 
Join Date: Feb 2016
Location: Tunisia
Posts: 455
Reputation: 45
Default Re: Simple PM System

Quote:
Originally Posted by Stev View Post
The code itself isn't to bad I guess, i couldn't help but notice this.

Code:
CMD:pm(playerid, params[])
{
    new str[175], str2[175], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "us", id, str2))
    {
        SendClientMessage(playerid, COLOR_ORANGE, "Usage: /pm <id> <message>");
        return 1;
    }
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player not connected");
    if(playerid == id) return SendClientMessage(playerid, COLOR_RED, "ERROR: You cannot pm yourself!");
    { // This isn't needed
        GetPlayerName(playerid, Name1, sizeof(Name1));
        GetPlayerName(id, Name2, sizeof(Name2));
        format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
        SendClientMessage(playerid, COLOR_ORANGE, str);
        PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
        format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
        SendClientMessage(id, COLOR_YELLOW, str);
        PlayerPlaySound(id, 1057, 0.0, 0.0, 0.0);
        printf(str);
        LastPm[id] = playerid;
    } // This isn't needed
    return 1;
}
Oh yes, you're right! lol i didn't notice that.
Well, it works well without any bugs but i'll fix that later. atleast, it works well without bugs atm. thanks mate
__________________
Code:
[Filterscript] Mechanic System V0.1 BETA
[Filterscript] Simple PM System
[Filterscript] Mechanic System V0.1 ALPHA (Improved Version)
Please donate here:
paypal.me/Clark783
MarkNelson is offline   Reply With Quote
Old 06/02/2018, 08:14 PM   #6
AlexMSK
Huge Clucker
 
AlexMSK's Avatar
 
Join Date: Apr 2016
Location: Albania, yez
Posts: 214
Reputation: 61
Default Re: Simple PM System

Quote:
Originally Posted by Stev View Post
The code itself isn't to bad I guess, i couldn't help but notice this.

Code:
CMD:pm(playerid, params[])
{
    new str[175], str2[175], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "us", id, str2))
    {
        SendClientMessage(playerid, COLOR_ORANGE, "Usage: /pm <id> <message>");
        return 1;
    }
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player not connected");
    if(playerid == id) return SendClientMessage(playerid, COLOR_RED, "ERROR: You cannot pm yourself!");
    { // This isn't needed
        GetPlayerName(playerid, Name1, sizeof(Name1));
        GetPlayerName(id, Name2, sizeof(Name2));
        format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
        SendClientMessage(playerid, COLOR_ORANGE, str);
        PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
        format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
        SendClientMessage(id, COLOR_YELLOW, str);
        PlayerPlaySound(id, 1057, 0.0, 0.0, 0.0);
        printf(str);
        LastPm[id] = playerid;
    } // This isn't needed
    return 1;
}
How is that needed while hes returning it?
PHP Code:
if(playerid == id) return SendClientMessage(playeridCOLOR_RED"ERROR: You cannot pm yourself!"); 



And gj to the creator, keep it up.
__________________
Old School Roleplay
samp.os-rp.com | www.os-rp.com


AlexMSK is offline   Reply With Quote
Old 06/02/2018, 08:24 PM   #7
Stev
Big Clucker
 
Join Date: Oct 2013
Location: United Kingdom
Posts: 145
Reputation: 15
Default Re: Simple PM System

He already returned the value after the statement.

Code:
if (playerid == id)
	return SendClientMessage(playerid, COLOR_ORED, "ERROR: You cannot pm yourself!");

// Continue code..
The brackets there are unnecessary.
Stev is offline   Reply With Quote
Old 06/02/2018, 08:25 PM   #8
iLearner
Gangsta
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 557
Reputation: 116
Default Re: Simple PM System

Can't really say its useful, nonetheless, good job.
iLearner is offline   Reply With Quote
Old 06/02/2018, 08:28 PM   #9
AlexMSK
Huge Clucker
 
AlexMSK's Avatar
 
Join Date: Apr 2016
Location: Albania, yez
Posts: 214
Reputation: 61
Default Re: Simple PM System

Quote:
Originally Posted by Stev View Post
He already returned the value after the statement.

Code:
if (playerid == id)
	return SendClientMessage(playerid, COLOR_ORED, "ERROR: You cannot pm yourself!");

// Continue code..
The brackets there are unnecessary.
Ops my bad :/ Thought you said it was needed.
__________________
Old School Roleplay
samp.os-rp.com | www.os-rp.com


AlexMSK is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Experience system + Simple Account System KingHual Filterscripts 72 27/06/2015 09:07 PM
[FilterScript] Simple Briefcase System + A Simple Whisper System by kosa451 kosa451 Filterscripts 4 16/09/2013 08:20 PM
[FilterScript] Simple AFK System Visatara Filterscripts 6 26/04/2013 05:34 AM


All times are GMT. The time now is 10:05 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.