Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //* Evo vam FileScript na Hrvatskom jeziku, komanda da vam dode dialog ovga je /administrator kad se ulogirate kao RCON Admin.HTTP //
- #include <a_samp>
- #define console 1000
- #define dialog_kick 1001
- #define dialog_ban 1002
- #define dialog_say 1003
- #define dialog_announce 1004
- #define dialog_kill 1005
- #define COLOR_RED 0xAA3333AA
- #define COLOR_WHITE 0xFFFFFFAA
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" RCON Komande");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/administrator", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- ShowPlayerDialog(playerid,console,DIALOG_STYLE_LIST,"{FF0000}RCON Komande","Re-Start Server\nKick\nUgasi Server\nBan\nText na Chat-u\nText na ekran-u\nUbi Igraca","Odaberi", "Poništi");
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "Nisi ovlašten.:{FF0000} Nisi ulogiran kao RCON Adminstrator");
- }
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(!response) return 1;
- if(dialogid == console)
- {
- if(listitem == 0)
- {
- SendRconCommand("gmx");
- SendClientMessageToAll(COLOR_RED, "Server se pomovo pokrece, molimo pricekajte..........");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, dialog_kick,DIALOG_STYLE_INPUT,"Kick","ID Igraca.","Kick","Ponisti");
- }
- if(listitem == 2)
- {
- SendRconCommand("exit");
- SendClientMessageToAll(COLOR_RED, "Server je ugašen preko RCON Administratora..");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, dialog_ban,DIALOG_STYLE_INPUT,"{FF0000}Ban","ID Igraca .","Ban","Ponisti");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, dialog_say,DIALOG_STYLE_INPUT,"{FF0000}Say","Unesi te text koji zelite da ostali igraci vide na svom chat-u","Text na chat-u","Ponisti");
- }
- if(listitem == 5)
- {
- ShowPlayerDialog(playerid, dialog_announce,DIALOG_STYLE_INPUT,"{FF0000}Announce","Unesi te text koji zeli te da igraci vide na svom ekranu.","Text na ekranu","Ponisti");
- }
- if(listitem == 6)
- {
- ShowPlayerDialog(playerid, dialog_kill,DIALOG_STYLE_INPUT,"{FF0000}Kill Player","ID Igraca kojeg zeli te ubit.","Ubi igraca","Ponisti");
- }
- }
- if(dialogid == dialog_kick)
- {
- new
- iReturn = strval(inputtext);
- if(!response) return 1;
- if(IsPlayerConnected(iReturn))
- {
- SendClientMessage(iReturn, COLOR_RED, "Kikan si od strane RCON Administratora");
- Kick(iReturn);
- }
- }
- if(dialogid == dialog_ban)
- {
- new
- iReturn1 = strval(inputtext);
- if(!response) return 1;
- if(IsPlayerConnected(iReturn1))
- {
- SendClientMessage(iReturn1, COLOR_RED, "Banovan si od strane RCON Administratora");
- Ban(iReturn1);
- }
- }
- if(dialogid == dialog_say)
- {
- if(!response) return 1;
- else
- {
- SendClientMessageToAll(COLOR_WHITE, inputtext);
- }
- }
- if(dialogid == dialog_announce)
- {
- if(!response) return 1;
- else
- {
- GameTextForAll(inputtext, 5000, 3 );
- }
- }
- if(dialogid == dialog_kill)
- {
- new
- iReturn5 = strval(inputtext);
- if(!response) return 1;
- if(IsPlayerConnected(iReturn5))
- {
- SendClientMessage(iReturn5, COLOR_RED, "Ubijen si od strane RCON Administratora");
- SetPlayerHealth(iReturn5, 0.0);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement