Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define DIALOG_TESTTW 9999
- daca ai pe enum {
- DIALOG_TESTTW
- Daca ai pe switch
- case DIALOG_TESTTW:
- {
- new string[150];
- if(!response)
- {
- new
- Float:PosAdmin[3],
- adminid = GetPVarInt(playerid, "AdminNoob");
- GetPlayerPos(adminid, PosAdmin[0], PosAdmin[1], PosAdmin[2]);
- SetPlayerPos(adminid, PosAdmin[0], PosAdmin[1], PosAdmin[2]);
- format(string, sizeof(string), "%s a acceptat cererea de test teamviwer",GetName(playerid));
- SCM(adminid, -1, string);
- format(string, sizeof(string), "Ai acceptat cererea de test teamviwer de la adminul %s.",GetName(adminid));
- SCM(playerid,-1,string);
- SCM(playerid,-1,"Ai fost teleportat cu succes!");
- }
- else
- {
- format(string, sizeof(string), "Ban: %s has been banned by AdmBot, reason: Necooperare admin(TW).", GetName(playerid));
- BanEx(playerid, "Necooperare admin(TW)");
- SendClientMessageToAll(COLOR_LIGHTRED, string);
- }
- }
- Daca nu in loc de case pui if(dialogid == DIALOG_TESTTW)
- Comanda:
- CMD:testtw(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new id,string[100];
- if(sscanf(params,"u",id)) return SCM(playerid, -1, "/testtw <Name/PlayerID");
- if(id == playerid) return SCM(playerid, -1, "Nu poti folosi aceasta comanda pe tine.");
- if(IsPlayerConnected(id))
- {
- if(id != INVALID_PLAYER_ID)
- {
- format(string, sizeof(string), "Admin-ul %s te-a tras la teste teamviwer.",GetName(playerid));
- ShowPlayerDialog(id, DIALOG_TESTTW, DIALOG_STYLE_MSGBOX, "Test Teamviwer", string, "Accepta", "Refuza");
- SetPVarInt(id,"AdminNoob",playerid);
- }
- }
- else return SCM(playerid, -1, "Acel player nu este conectat.");
- }
- else return SCM(playerid, -1, AdminOnly);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment