Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=========================AdminBox 0.2 BY [PNC]Angelo=========================//
- //------------------------------INCLUDES---------------------------------//
- #include <a_samp>
- //------------------------------DEFINES---------------------------------//
- #define VARIE 2012
- #define COLOR_RED 0xFF1F10AA //rosso
- #define COLOR_GREEN 0x00FF00AA //verde
- //------------------------------VARIBILI---------------------------------//
- new cliccato;
- new freeze[MAX_PLAYERS];
- new muted[MAX_PLAYERS];
- new jailato[MAX_PLAYERS];
- //----------------------------ONDIALOGRESPONSE-----------------------------------//
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- cliccato = GetPVarInt(playerid,"Clicked");
- if(dialogid == VARIE)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new Float:x , Float:y , Float:z;
- GetPlayerPos(cliccato, x , y , z);
- SetPlayerPos(playerid , x , y , z);
- SendClientMessage(cliccato , COLOR_GREEN , "L'admin si è gotato da te");
- }
- if(listitem == 1)
- {
- new Float:x , Float:y , Float:z;
- GetPlayerPos(playerid , x , y , z);
- SetPlayerPos(cliccato, x+1 , y , z);
- SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha gotato a se");
- }
- if(listitem == 2)
- {
- SetPlayerHealth(cliccato , 0);
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha killato");
- }
- if(listitem == 3)
- {
- SetPlayerArmour(cliccato , 100);
- SetPlayerHealth(cliccato , 100);
- SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha ricaricato vita e armatura");
- }
- if(listitem == 4)
- {
- new Float:x , Float:y , Float:z;
- GetPlayerPos(cliccato, x , y , z);
- CreateExplosion(x, y , z + 3, 1, 10);
- SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha bruciato");
- }
- if(listitem == 5)
- {
- new Float:x , Float:y , Float:z;
- GetPlayerPos(cliccato, x , y , z);
- CreateExplosion(x, y , z , 7,10.0);
- SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha fatto esplodere");
- }
- if(listitem == 6)
- {
- new Float:x , Float:y , Float:z;
- GetPlayerPos(cliccato, x , y , z);
- SetPlayerPos(cliccato, x, y , z+5);
- SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha slappato");
- }
- if(listitem == 7)
- {
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha kickato");
- Kick(cliccato);
- }
- if(listitem == 8)
- {
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha bannato");
- Ban(cliccato);
- }
- if(listitem == 9)
- {
- TogglePlayerControllable(cliccato , false);
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha freezato");
- freeze[playerid] = 1;
- }
- if(listitem == 10)
- {
- if(freeze[playerid] == 1)
- {
- TogglePlayerControllable(cliccato , true);
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha sfreezzato");
- }
- }
- if(listitem == 11)
- {
- ResetPlayerWeapons(cliccato);
- PlayerPlaySound(cliccato,1057,0.0,0.0,0.0);
- SendClientMessage(cliccato , COLOR_RED , "L'admin ha resettato le tue armi");
- }
- if(listitem == 12)
- {
- muted[playerid] = 1;
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha mutato");
- }
- if(listitem == 13)
- {
- if(muted[playerid] == 1)
- {
- muted[playerid] = 0;
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha ridato la parola");
- }
- }
- if(listitem == 14)
- {
- jailato[playerid] = 1;
- SetPlayerFacingAngle(playerid, 177.0350);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 197.7029,174.8801,1003.0234);
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha jailato");
- }
- if(listitem == 15)
- {
- if(jailato[playerid] == 1)
- {
- SpawnPlayer(playerid);
- jailato[playerid] = 0;
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha unjailato");
- }
- }
- if(listitem == 16)
- {
- ResetPlayerMoney(cliccato);
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha mandato in bancarotta");
- }
- if(listitem == 17)
- {
- GivePlayerMoney(cliccato , 1000000);
- SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha mandato 1000000$");
- }
- if(listitem == 18)
- {
- new name[MAX_PLAYER_NAME] , kill , soldi , ping,stringa[256];
- new Float:vita , Float:armatura;
- GetPlayerName(cliccato , name , sizeof(name));
- kill = GetPlayerScore(cliccato);
- soldi = GetPlayerMoney(cliccato);
- GetPlayerHealth(cliccato , vita);
- GetPlayerArmour(cliccato , armatura);
- ping = GetPlayerPing(cliccato);
- format(stringa , 256 , "%s ha %d kill , %d dollari e il suo ping è %d " , name , kill , soldi , ping);
- SendClientMessage(playerid , COLOR_GREEN , stringa);
- }
- }
- return 1;
- }
- return 0;
- }
- //---------------------------ONPLAYERCLICKPLAYER------------------------------------//
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- if(IsPlayerAdmin(playerid))
- {
- SetPVarInt(playerid,"Clicked",clickedplayerid);
- ShowPlayerDialog(playerid, VARIE , DIALOG_STYLE_LIST, "Comandi Admin" , "Goto\nGethere\nKill\nRicarica\nBrucia\nEsplodi\nSlappa\nKicka\nBanna\nFreeze\nUnfreeza\nDisarma\nMute\nUnmute\nJail\nUnjail\nBancarotta\nArricchisci\nInfo", "Seleziona", "Cancella");
- }
- return 1;
- }
- //--------------------------ONPLAYERTEXT-------------------------------------//
- public OnPlayerText(playerid , text[])
- {
- if(muted[playerid] == 1)
- {
- SendClientMessage(cliccato , COLOR_RED , "Sei mutato");
- return 0;
- }
- return 1;
- }
- //--------------------------ONPLAYERCOMMANDTEXT-------------------------------------//
- public OnPlayerCommandText(playerid , cmdtext[])
- {
- if(jailato[playerid] == 1) return SendClientMessage(playerid , COLOR_GREEN , "Sei jailato e non puoi usare comandi");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement