SHOW:
|
|
- or go back to the newest paste.
| 1 | - | // Please don't leave credits |
| 1 | + | // Please don't leave credits! |
| 2 | - | // FS released su www.multiplayerarena.it e Sa-Mp Forum! |
| 2 | + | // FS rilasciato su www.multiplayerarena.it e Sa-Mp Forum! |
| 3 | //Indom PM System - Credits to Captive for helping me in every script <3 | |
| 4 | ||
| 5 | #include <a_samp> | |
| 6 | ||
| 7 | public OnFilterScriptInit() | |
| 8 | {
| |
| 9 | print("\n--------------------------------------");
| |
| 10 | - | print(" Indom OPCP PM System v1");
|
| 10 | + | print(" Indom OPCP PM System v0.1");
|
| 11 | print("--------------------------------------\n");
| |
| 12 | return 1; | |
| 13 | } | |
| 14 | ||
| 15 | new ClickedPlayer[MAX_PLAYERS]; | |
| 16 | new StringaPM[128]; | |
| 17 | - | new Name[MAX_PLAYER_NAME]; |
| 17 | + | new Nome[MAX_PLAYER_NAME]; |
| 18 | ||
| 19 | - | // Defines DIALOGS & COLORS |
| 19 | + | // Defines DIALOGS & COLORI |
| 20 | ||
| 21 | #define DIALOG_CLICK 2000 | |
| 22 | #define DIALOG_PM 2001 | |
| 23 | // -- // | |
| 24 | #define RED 0xFF0000FF | |
| 25 | #define GREEN 0x00FF40FF | |
| 26 | #define YELLOW 0xFFFF00FF | |
| 27 | ||
| 28 | public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) | |
| 29 | {
| |
| 30 | if(dialogid == DIALOG_CLICK) | |
| 31 | {
| |
| 32 | - | if(!response) return SendClientMessage(playerid,RED,"You didn't select any option."); |
| 32 | + | if(!response) return SendClientMessage(playerid,RED,"You didn't selected any option."); |
| 33 | if(response) | |
| 34 | {
| |
| 35 | - | switch(listitem) |
| 35 | + | ShowPlayerDialog(playerid, 2001, DIALOG_STYLE_INPUT, "PM", "Enter the message to send", "Ok", "Quit"); |
| 36 | - | {
|
| 36 | + | |
| 37 | - | case 0: |
| 37 | + | |
| 38 | - | {
|
| 38 | + | |
| 39 | - | ShowPlayerDialog(playerid, 2001, DIALOG_STYLE_INPUT, "PM", "Enter the message to send", "Done", "Quit"); |
| 39 | + | |
| 40 | - | } |
| 40 | + | |
| 41 | if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Player OFFLINE!"); | |
| 42 | - | } |
| 42 | + | |
| 43 | {
| |
| 44 | GetPlayerName(playerid, Nome, sizeof(Nome)); | |
| 45 | GetPlayerName(playerid, ClickedPlayer, sizeof(ClickedPlayer)); | |
| 46 | format(StringaPM, sizeof(StringaPM), "(( PM received from: %s(%d): %s ))", ClickedPlayer, playerid, inputtext); | |
| 47 | SendClientMessage(playerid,GREEN, StringaPM); | |
| 48 | format(StringaPM, sizeof(StringaPM), "(( PM sent to: %s(%d): %s ))", Nome, playerid, inputtext); | |
| 49 | SendClientMessage(playerid,YELLOW, StringaPM); | |
| 50 | - | GetPlayerName(playerid, Name, sizeof(Name)); |
| 50 | + | |
| 51 | else | |
| 52 | - | format(StringaPM, sizeof(StringaPM), "(( PM receveid by: %s(%d): %s ))", ClickedPlayer, playerid, inputtext); |
| 52 | + | |
| 53 | SendClientMessage(playerid,0xFFFFFFAA,"You haven't entered a message!"); | |
| 54 | - | format(StringaPM, sizeof(StringaPM), "(( PM sent to: %s(%d): %s ))", Name, playerid, inputtext); |
| 54 | + | |
| 55 | } | |
| 56 | ||
| 57 | return 0; | |
| 58 | } | |
| 59 | public OnPlayerClickPlayer(playerid, clickedplayerid, source) | |
| 60 | {
| |
| 61 | ClickedPlayer[playerid] = clickedplayerid; | |
| 62 | if(playerid == clickedplayerid)return SendClientMessage(playerid,RED,"You can't send messages to yourself!"); | |
| 63 | else | |
| 64 | {
| |
| 65 | ShowPlayerDialog(playerid,DIALOG_CLICK,DIALOG_STYLE_LIST,"Choose what you wanna do","Send PM","Ok","Quit"); | |
| 66 | } | |
| 67 | return 1; | |
| 68 | - | if(playerid == clickedplayerid)return SendClientMessage(playerid,RED,"You can not send messages to yourself!"); |
| 68 | + |