Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // INC //
- #include <a_samp>
- #include <zcmd>
- main() return true;
- // VAR //
- new bool:AzPmStats[MAX_PLAYERS] = false;
- new Rec[MAX_PLAYERS];
- // Call Back //
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" PM AZ By AZULA 2015 pwn scripting ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- switch(AzPmStats[playerid]) {
- case false: {
- return true;
- }
- case true : {
- Rec[playerid] = clickedplayerid;
- ShowPlayerDialog(playerid, 21, DIALOG_STYLE_INPUT, "{FF2EE1}[Az-Pm] :", "{FC0B2F}Please enter your text:", "Send", "Cancel");
- return true;
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 21)
- {
- if(!response)
- {
- SendClientMessage(playerid,-1,"{FF2EE1}[Az-Pm] : {FC0B0B}Message failed to send");
- Rec[playerid] = 0;
- }
- else
- {
- new text[512];
- format(text,sizeof(text), "{FF2EE1}[Az-Pm] : {FCF80B}Message from {FC0B2F}%s {FCF80B}ID {FCF80B}(%i) : {FF2EE1}%s.",GetName(playerid),playerid,inputtext);
- SendClientMessage(Rec[playerid],-1,text);
- Rec[playerid] = 0;
- }
- return 1;
- }
- return 0;
- }
- // CMD //
- COMMAND:azpm(playerid, params[]) // /azpm to switch azPm on or off
- {
- switch(AzPmStats[playerid]){
- case false:{
- SendClientMessage(playerid,-1,"{FF2EE1}[Az-Pm] : {B6B6B6}Az Pm is On Now Click in the tab score menu to PM players");
- SendClientMessage(playerid,-1,"{FF2EE1}[Az-Pm] : {FC0B0B}/azpm {B6B6B6}to switch off the pm system");
- AzPmStats[playerid] = true;
- return true;
- }
- case true :{
- SendClientMessage(playerid,-1,"{FF2EE1}[Az-Pm] : {B6B6B6}Az Pm is {FC0B2F}Off {B6B6B6}Now");
- AzPmStats[playerid] = false;
- return true;
- }
- }
- return true;
- }
- // stock //
- stock GetName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement