CZskypr 0 Odesláno: 16. Leden, 2013 Share Odesláno: 16. Leden, 2013 Po nastavení admin levelu jak přes přikaz tak přes adminku (scriptfiles) nefunguje ani jeden způsob jednou se uloží pak zas ne ale vetšinou se neuloží po připojení na server nemam level. Toto mam v OnPlayerDisconnect() if(IsAdminRegister(playerid)) SaveAdmin(playerid); Dokonce jsem to dal do OnPlayerDeath() protože si nevím rady toto je public SaveAdmin() public SaveAdmin(playerid) { new cesta[100]; format(cesta, sizeof(cesta), "+++++++++++/Admins/%s.cfg", PlayerName(playerid)); dini_Set (cesta, "Password", ReturnPVarString(playerid, "AdminPassword")); dini_IntSet (cesta, "Level", GetPVarInt(playerid, "AdminLevel")); return 1; } Pokud chcete něco dodat třeba public nejakoů funkci napište. Link to comment Share on other sites More sharing options...
0 H2SO4 0 Odesláno: 17. Leden, 2013 Share Odesláno: 17. Leden, 2013 forward LoginAdmin(playerid, password[]); public LoginAdmin(playerid, password[]) { if(IsPlayerNPC(playerid)) return 1; new cesta[64]; format(cesta, 64, "+++++++++++/Admins/%s.cfg", PlayerName(playerid)); if(strcmp(dini_Get(cesta, "Password"), password, true) || strlen(password) == 0) { ShowPlayerDialog(playerid, Dialog_AdminLogin, DIALOG_STYLE_INPUT, "{FF0000}Login", "For load your admin settings login!", "OK", "Konec"); return SendClientMessage(playerid, C_RED, "Wrong Password."); } SetPVarString(playerid, "AdminPassword", password); SetPVarInt(playerid, "AdminLevel", dini_Int(cesta, "Level")); new string[128]; format(string, sizeof(string), "Login Admin Account {FF0000}%s{FFFFFF} is succesfully.", PlayerName(playerid)); SendClientMessage(playerid, C_WHITE, string); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0); return 1; } -------------------------------------- dcmd(aadmin, 6, cmdtext); dcmd_aadmin(playerid, params[]) { new string[240]; new CMD_ID = strval(params[0]); new level = strval(params[1]); if(HowIsAdminLevel(playerid) == 0) SendClientMessage(playerid,C_RED,"{FFFFFF}[ {FF0000}AADMIN {FFFFFF}] You aren't Admin."); else if(HowIsAdminLevel(playerid) <= 2) return SendClientMessage(playerid,C_RED,"{FFFFFF}[ {FF0000}AADMIN {FFFFFF}] Low Admin Level."); else if(!params[0] || !params[1]) return SendClientMessage(playerid, white,"{FFFFFF}[ {FF0000}AADMIN {FFFFFF}] /aadmin [iD] [LEVEL 0/3]."); else if(strval(params[1]) < 0 || strval(params[1]) > 3) return SendClientMessage(playerid, white, "{FFFFFF}[ {FF0000}AADMIN {FFFFFF}] /aadmin [iD] [LEVEL 0/3]."); else if(!IsPlayerConnected(CMD_ID)) return SendClientMessage(playerid, white, "{FFFFFF}[ {FF0000}AADMIN {FFFFFF}] Player isn't on the server."); else if(HowIsAdminLevel(CMD_ID) == 3) return SendClientMessage(playerid, white, "{FFFFFF}[ {FF0000}AADMIN {FFFFFF}] You can't change Admin LVL to Main Admin."); else if(params[0] || params[1]) { SetPVarInt(CMD_ID, "AdminLevel", level); SaveAdmin(CMD_ID); format(string, sizeof(string), "{FFFFFF}[ {FF0000}AADMIN {FFFFFF}] Administrator (%s) set Admin LVL (%d) player (%s).",PlayerName(playerid),level,PlayerName(CMD_ID)); SendClientMessageToAll(white, string); } return 1; } Snad je to ono, Qwere To je z toho módu tak jak to tam je snad je to to co si po mě chtěl (já nejsem pawner , pawner modu je skypr ale není aktualně na netu tak jsem to musel já vytáhnout. ) Díky Link to comment Share on other sites More sharing options...
0 CZskypr 0 Odesláno: 18. Leden, 2013 Author Share Odesláno: 18. Leden, 2013 Prosím jak udelak aby to šlo pro id věcí jak 9 a s tím ukladaním teda nevíš?.. Link to comment Share on other sites More sharing options...
0 CZskypr 0 Odesláno: 18. Leden, 2013 Author Share Odesláno: 18. Leden, 2013 JJ tak nic a dík za ten SSCANF a kdiby s yjistil čim to je to ukladání tak napiš sem nebo mě sz DÍK.. Link to comment Share on other sites More sharing options...
Dotaz
CZskypr 0
Po nastavení admin levelu jak přes přikaz tak přes adminku (scriptfiles)
nefunguje ani jeden způsob jednou se uloží pak zas ne ale vetšinou se
neuloží po připojení na server nemam level.
Toto mam v OnPlayerDisconnect()
if(IsAdminRegister(playerid)) SaveAdmin(playerid);
Dokonce jsem to dal do OnPlayerDeath()
protože si nevím rady
toto je public SaveAdmin()
public SaveAdmin(playerid)
{
new cesta[100];
format(cesta, sizeof(cesta), "+++++++++++/Admins/%s.cfg", PlayerName(playerid));
dini_Set (cesta, "Password", ReturnPVarString(playerid, "AdminPassword"));
dini_IntSet (cesta, "Level", GetPVarInt(playerid, "AdminLevel"));
return 1;
}
Pokud chcete něco dodat třeba public nejakoů funkci napište.
Link to comment
Share on other sites
3 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now