Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #define DIALOG_UCP 1
- #define HP SetPlayerHealth
- #define SCM SendClientMessage
- #define SCMA SendClientMessageToAll
- #define Kapcsolat(%0) ((%0)?("Bekapcsolva"):("Kikapcsolva"))
- #pragma tabsize 0
- new AFK[MAX_PLAYERS];
- new GOD[MAX_PLAYERS];
- new string[512];
- public OnPlayerConnect(playerid)
- {
- AFK[playerid]=0;
- GOD[playerid]=0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- AFK[playerid]=0;
- GOD[playerid]=0;
- return 1;
- }
- CMD:ucp(playerid,params[])
- {
- format(string,sizeof(string), "Nincs Gépnél : %s [/afk]\nHalhatatlanság : %s [/god]\n",Kapcsolat(AFK[playerid]),Kapcsolat(GOD[playerid]));
- ShowPlayerDialog(playerid,DIALOG_UCP,DIALOG_STYLE_LIST,"Játékos Kezelő Fülke [In - Game]",string,"Választ","Kilépés");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_UCP)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPVarInt(playerid,"AFK") == 0)
- {
- AFK[playerid] = 1;
- SetPVarInt(playerid,"AFK",1);
- TogglePlayerControllable(playerid,false);
- format(string, sizeof(string), "{AA3333}[AFK] {CECECE}%s {AA3333}Nem Elérhető !",pName(playerid));
- SCMA(-1, string);
- return cmd_ucp(playerid);
- }
- else if(GetPVarInt(playerid,"AFK") == 1 )
- {
- AFK[playerid] = 0;
- SetPVarInt(playerid, "AFK",0);
- TogglePlayerControllable(playerid,true);
- format(string, sizeof(string), "{AA3333}[AFK] {CECECE}%s {AA3333}Elérhető !",pName(playerid));
- SCMA(-1, string);
- return cmd_ucp(playerid);
- }
- }
- if(listitem == 1)
- {
- if(GetPVarInt(playerid,"GOD") == 0)
- {
- GOD[playerid] = 1;
- SetPVarInt(playerid,"GOD",1);
- HP(playerid,9999999999);
- SCM(playerid,-1,"{AA3333}[GOD] {CECECE}Mostantol halhatatlan vagy!");
- return cmd_ucp(playerid);
- }
- else if(GetPVarInt(playerid,"GOD") == 1 )
- {
- GOD[playerid] = 0;
- SetPVarInt(playerid, "GOD",0);
- HP(playerid,100);
- SCM(playerid,-1,"{AA3333}[GOD] {CECECE}Mostantol sebezhető vagy!");
- return cmd_ucp(playerid);
- }
- }
- }
- }
- return 1;
- }
- CMD:afk(playerid, params[])
- {
- if(GetPVarInt(playerid,"AFK") == 0)
- {
- AFK[playerid] = 1;
- TogglePlayerControllable(playerid,false);
- SetPVarInt(playerid,"AFK",1);
- format(string, sizeof(string), "{AA3333}[AFK] {CECECE}%s {AA3333}Nem Elérhető !",pName(playerid));
- SCMA(-1, string);
- }
- else if(GetPVarInt(playerid,"AFK") == 1 )
- {
- AFK[playerid] = 0;
- TogglePlayerControllable(playerid,true);
- SetPVarInt(playerid, "AFK",0);
- format(string, sizeof(string), "{AA3333}[AFK] {CECECE}%s {AA3333}Elérhető !",pName(playerid));
- SCMA(-1, string);
- }
- return 1;
- }
- CMD:god(playerid, params[])
- {
- if(GetPVarInt(playerid,"GOD") == 0)
- {
- GOD[playerid] = 1;
- SetPVarInt(playerid,"GOD",1);
- HP(playerid,9999999999);
- SCM(playerid,-1,"{AA3333}[GOD] {CECECE}Mostantol halhatatlan vagy!");
- }
- else if(GetPVarInt(playerid,"GOD") == 1 )
- {
- GOD[playerid] = 0;
- SetPVarInt(playerid, "GOD",0);
- HP(playerid,100);
- SCM(playerid,-1,"{AA3333}[GOD] {CECECE}Mostantol sebezhető vagy!");
- }
- return 1;
- }
- stock pName(playerid) { new n[24]; GetPlayerName(playerid, n, 24);return n;}
- //UCP By : MLP]LoFoLi.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement