Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ,ad8888ba,
- d8"' `"8b
- d8'
- 88 ,adPPYba, ,adPPYba, 8b,dPPYba, ,adPPYb,d8 ,adPPYba,
- 88 88888 a8P_____88 a8" "8a 88P' "Y8 a8" `Y88 a8P_____88
- Y8, 88 8PP""""""" 8b d8 88 8b 88 8PP"""""""
- Y8a. .a88 "8b, ,aa "8a, ,a8" 88 "8a, ,d88 "8b, ,aa
- `"Y88888P" `"Ybbd8"' `"YbbdP"' 88 `"YbbdP"Y8 `"Ybbd8"'
- aa, ,88
- "Y8bbdP"
- Don't Edit The Script Just If You Are A Good Scripter
- PM System By GEORGE
- Don't Edit The Script Just If You Are A Good Scripter
- */
- #define FILTERSCRIPT
- ///////Includes////////////////
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #include <YSI\y_ini>
- ///////////////////////////////
- ///////////Colours/////////////
- #define COLOR_RED 0xFF0000FF
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_ORANGE 0xFF9900AA
- ///////////////////////////////
- ////////////Enum///////////////
- enum PMInfo
- {
- LastPM,
- NoPM,
- };
- new pInfo[MAX_PLAYERS][PMInfo];
- ///////////////////////////////
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n**************************************");
- print("* PM System Made By George *");
- print("* Don't Remove My Credits! *");
- print("* [ LOADED ] *");
- print("**************************************\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #endif
- CMD:pm(playerid, params[])
- {
- new pName[MAX_PLAYER_NAME], string[250], String[250],target, tName[MAX_PLAYER_NAME];
- if(sscanf(params, "us[50]",target,params)) return SendClientMessage(playerid, -1, "{FF0000}USAGE : {FF0000}/pm [ID][MESSAGE]");
- if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "ERROR : {FF0000}Invalid Player Id");
- if(target == playerid) return SendClientMessage(playerid, 0, "ERROR : {FF0000}You Cannot PM Your Self!");
- if(pInfo[target][NoPM]) return SendClientMessage(playerid, -1, "ERROR : {FF0000}This Player Has NoPM On!");
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(target, tName, sizeof(tName));
- format(string ,sizeof(string), "{C0C0C0}|- PM From %s : %s -|", pName, params);
- SendClientMessage(target,0, string);
- format(String, sizeof(String), "{C0C0C0}|- PM Sent To %s -|", tName);
- SendClientMessage(playerid, 0, String);
- return 1;
- }
- CMD:nopm(playerid, params[])
- {
- if(pInfo[playerid][NoPM] == 0)
- {
- pInfo[playerid][NoPM] = 1;
- SendClientMessage(playerid, -1, "{FF0000}INFO : {FFFFFF}You Have Enabled NoPM No One Will Be Able To PM You!");
- }
- else
- {
- pInfo[playerid][NoPM] = 0;
- SendClientMessage(playerid, -1, "{FF0000}INFO : {FFFFFF}You Have Disabled NoPM EveryOne Will Be Able To PM You!");
- }
- return 1;
- }
- CMD:reply(playerid, params[])
- {
- new pName[MAX_PLAYER_NAME], string[128],target, tName[MAX_PLAYER_NAME];
- if(sscanf(params, "s", params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /reply [MESSAGE]");
- new pID = pInfo[playerid][LastPM];
- if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "ERROR : Player is not connected.");
- if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR : You cannot PM yourself.");
- if(pInfo[pID][NoPM] == 1) return SendClientMessage(playerid, COLOR_RED, "ERROR : This player has NoPM on you cannot PM his or reply him back!");
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(target, tName, sizeof(tName));
- format(string, sizeof(string), "{C0C0C0}|- PM Sent To %s -|", tName, params);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "{C0C0C0}|- PM From %s : %s -|", pName, params);
- SendClientMessage(pID, COLOR_YELLOW, string);
- pInfo[pID][LastPM] = playerid;
- return 1;
- }
- CMD:r(playerid, params[])
- {
- new pName[MAX_PLAYER_NAME], string[128],target, tName[MAX_PLAYER_NAME];
- if(sscanf(params, "s", params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /reply [MESSAGE]");
- new pID = pInfo[playerid][LastPM];
- if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "ERROR : Player is not connected.");
- if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR : You cannot PM yourself.");
- if(pInfo[pID][NoPM] == 1) return SendClientMessage(playerid, COLOR_RED, "ERROR : This player has NoPM on you cannot PM his or reply him back!");
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(target, tName, sizeof(tName));
- format(string, sizeof(string), "{C0C0C0}|- PM Sent To %s -|", tName, params);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "{C0C0C0}|- PM From %s : %s -|", pName, params);
- SendClientMessage(pID, COLOR_YELLOW, string);
- pInfo[pID][LastPM] = playerid;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement