Google..r Posted February 15, 2017 Share Posted February 15, 2017 As vrea sa stiu cum fac o comanda secreta pentru un gamemode RPG, cu acea comanda sa-mi pot da admin. Quote Link to comment Share on other sites More sharing options...
qDany Posted February 15, 2017 Share Posted February 15, 2017 (edited) Poti gasi aceasta comanda in gm-ul skim, dar o sa ti-o las eu aici. Dar daca vrei sa o faci chiar tu poti urmarii comanda /makeadmin schimband unele variabile. CMD:vreauadmin(playerid, params[]) { if(IsPlayerConnected(playerid)) { new id,adminlevel,sendername[30],giveplayer[30],string[200],escape[200]; if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFFFFF}Syntax: {FFFFFF}/vreauadmin` <Name/Playerid> <Admin Level>"); if(IsPlayerConnected(id)) { if(id != INVALID_PLAYER_ID) { GetPlayerName(id, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); printf("Admin: %s i-a dat %s admin, level %d .", sendername, giveplayer, adminlevel); format(string, sizeof(string), "Ai primit admin %d, level: %s.", adminlevel, sendername); SendClientMessage(id, COLOR_YELLOW, string); format(string, sizeof(string), "Ai dat admin %s, level %d.", giveplayer,adminlevel); SendClientMessage(playerid, COLOR_YELLOW, string); mysql_real_escape_string(string, escape); PlayerInfo[id][pAdmin] = adminlevel; if(adminlevel == 0) { AdminDuty[id] = 0; } new str[256]; mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Admin`='%d' WHERE `name`='%s'",PlayerInfo[id][pAdmin],PlayerInfo[id][pNormalName]); mysql_tquery(SQL,str,"",""); mysql_format(SQL,str, sizeof(str), "INSERT INTO staff_logs (`text`) VALUES ('%s')", escape); mysql_tquery(SQL,str,"",""); } } } return 1; } Edited February 15, 2017 by StroKe.SR Quote Link to comment Share on other sites More sharing options...
Vasile Georgel Posted February 16, 2017 Share Posted February 16, 2017 Poti pur si simplu sa scoti restrictiile de admin de la /makeadmin. Quote Link to comment Share on other sites More sharing options...
M1hai Posted February 16, 2017 Share Posted February 16, 2017 faci gen EstiFondator pe numele tau din game si la comanda makeadmin pui o restriectie pentru EstiFondator Quote Link to comment Share on other sites More sharing options...
Kingsley Posted February 16, 2017 Share Posted February 16, 2017 Foloseste urmatoare verificare la comanda /makeadmin: new playerName[MAX_PLAYER_NAME]; new Name = GetPlayerName(playerid, playerName, sizeof(playerName)); if(PlayerInfo[playerid][pAdmin] < 6 || !strcmp(Name, "Numele_Tau", true)) return SendClientMessage(playerid, -1, "Nu ai acces"); Quote Link to comment Share on other sites More sharing options...
Zooky. Posted February 16, 2017 Share Posted February 16, 2017 (edited) Foloseste urmatoare verificare la comanda /makeadmin: new playerName[MAX_PLAYER_NAME]; new Name = GetPlayerName(playerid, playerName, sizeof(playerName)); if(PlayerInfo[playerid][pAdmin] < 6 || !strcmp(Name, "Numele_Tau", true)) return SendClientMessage(playerid, -1, "Nu ai acces"); Gresit. Tu folosesti o variabila de tip string intr-o variabila de tip integer. Asa e corect: new playerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, playerName, sizeof(playerName)); if(PlayerInfo[playerid][pAdmin] < 6 || !strcmp(playerName, "Numele_Tau", true)) return SendClientMessage(playerid, -1, "Nu ai acces"); Edited February 16, 2017 by Alliance Zooky. Quote Link to comment Share on other sites More sharing options...
Kingsley Posted February 16, 2017 Share Posted February 16, 2017 Gresit. Tu folosesti o variabila de tip string intr-o variabila de tip integer. Asa e corect: new playerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, playerName, sizeof(playerName)); if(PlayerInfo[playerid][pAdmin] < 6 || !strcmp(playerName, "Numele_Tau", true)) return SendClientMessage(playerid, -1, "Nu ai acces"); ups... se mai intampla dupa 3 luni de pauza :) mersi ca m-ai corectat Quote Link to comment Share on other sites More sharing options...
Google..r Posted February 16, 2017 Author Share Posted February 16, 2017 Mutumesc de ajutor! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.