Kvostyc 4 Odesláno: 10. Leden, 2015 Share Odesláno: 10. Leden, 2015 čus mám urobenú registráciu cez dini ale ked sa odpojím tak sa mi nevytvára zložka onplayerdisconnect: new cesta[50]; format(cesta, sizeof(cesta), "/PlayerInfo/%s.ini", PlayerName(playerid)); if(dini_Exists(cesta)) { dini_Create(cesta); GetPlayerHealth(playerid,pInfo[playerid][pHealth]); GetPlayerArmour(playerid,pInfo[playerid][pArmour]); GetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]); dini_IntSet(cesta,"Heslo",pInfo[playerid][Heslo]); dini_Set(cesta, "Meno", PlayerName(playerid)); dini_FloatSet(cesta, "X", pInfo[playerid][pX]); dini_FloatSet(cesta, "Y", pInfo[playerid][pY]); dini_FloatSet(cesta, "Z", pInfo[playerid][pZ]); dini_IntSet(cesta, "AdminLevel", pInfo[playerid][pAdminLevel]); dini_IntSet(cesta, "Money", GetPlayerMoney(playerid)); dini_IntSet(cesta, "Skin", GetPlayerSkin(playerid)); dini_BoolSet(cesta, "Vodicak", pInfo[playerid][Vodicak]); dini_IntSet(cesta, "WantedLevel", GetPlayerWantedLevel(playerid)); dini_FloatSet(cesta, "HP", floatround(pInfo[playerid][pHealth])); dini_FloatSet(cesta, "Vesta", floatround(pInfo[playerid][pArmour])); dini_IntSet(cesta, "Vezenie", pInfo[playerid][Vezenie]); } dialogy: if(dialogid == DIALOG_REGISTER) { if(response) { if(strlen(inputtext)) { new cesta[50]; format(cesta, sizeof(cesta), "/PlayerInfo/%s.ini", PlayerName(playerid)); GetPlayerHealth(playerid,pInfo[playerid][pHealth]); GetPlayerArmour(playerid,pInfo[playerid][pArmour]); GetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]); dini_Create(cesta); dini_IntSet(cesta,"Heslo",num_hash(inputtext)); dini_Set(cesta, "Meno", PlayerName(playerid)); dini_FloatSet(cesta, "X", pInfo[playerid][pX]); dini_FloatSet(cesta, "Y", pInfo[playerid][pY]); dini_FloatSet(cesta, "Z", pInfo[playerid][pZ]); dini_IntSet(cesta, "AdminLevel", pInfo[playerid][pAdminLevel]); dini_IntSet(cesta, "Money", GetPlayerMoney(playerid)); dini_IntSet(cesta, "Skin", GetPlayerSkin(playerid)); dini_BoolSet(cesta, "Vodicak", pInfo[playerid][Vodicak]); dini_IntSet(cesta, "WantedLevel", GetPlayerWantedLevel(playerid)); dini_FloatSet(cesta, "HP", floatround(pInfo[playerid][pHealth])); dini_FloatSet(cesta, "Vesta", floatround(pInfo[playerid][pArmour])); dini_IntSet(cesta, "Vezenie", pInfo[playerid][Vezenie]); } } else { Kick(playerid); } } if(dialogid == DIALOG_LOGIN) { new cesta[50]; format(cesta, sizeof(cesta), "/PlayerInfo/%s.ini", PlayerName(playerid)); if(response) { if(strlen(inputtext)) { if(num_hash(inputtext) != dini_Int(cesta, "Heslo")) { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Zadaj heslo", "Ok", "Cancel"); } else { strmid(PlayerName(playerid), dini_Get(cesta, "Meno"), false, strlen(dini_Get(cesta, "Meno")), MAX_PLAYER_NAME); pInfo[playerid][pX] = dini_Float(cesta, "X"); pInfo[playerid][pY] = dini_Float(cesta, "Y"); pInfo[playerid][pZ] = dini_Float(cesta, "Z"); pInfo[playerid][pAdminLevel] = dini_Int(cesta, "AdminLevel"); pInfo[playerid][Vodicak] = dini_Bool(cesta, "Vodicak"); GivePlayerMoney(playerid, dini_Int(cesta, "Money")); pInfo[playerid][pHealth] = dini_Float(cesta, "HP"); pInfo[playerid][pArmour] = dini_Float(cesta, "Vesta"); SetPlayerSkin(playerid, dini_Int(cesta, "Skin")); SetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]); SetPlayerHealth(playerid,pInfo[playerid][pHealth]); SetPlayerArmour(playerid,pInfo[playerid][pArmour]); } } } else { Kick(playerid); } } } Link to comment Share on other sites More sharing options...
0 Kubko 22 Odesláno: 10. Leden, 2015 Share Odesláno: 10. Leden, 2015 Aká zložka? Pawn nedokáže vytvoriť zložky. Link to comment Share on other sites More sharing options...
0 Kvostyc 4 Odesláno: 10. Leden, 2015 Author Share Odesláno: 10. Leden, 2015 teda myslím ako ten súbor napríklad AlweR.txt alebo tak zložku mám vytvorenú Link to comment Share on other sites More sharing options...
0 The hidden face 77 Odesláno: 10. Leden, 2015 Share Odesláno: 10. Leden, 2015 A ty lomítka před PlayerInfo jsou na co? format(cesta, sizeof(cesta), "/PlayerInfo/%s.ini", PlayerName(playerid)); takhle (bez lomítka před PlayerInfo) : format(cesta, sizeof(cesta), "PlayerInfo/%s.ini", PlayerName(playerid)); Link to comment Share on other sites More sharing options...
0 Kvostyc 4 Odesláno: 10. Leden, 2015 Author Share Odesláno: 10. Leden, 2015 to je jedno može byť aj s lomítkom Ked vie niekto čo stým je tak píšte Link to comment Share on other sites More sharing options...
Dotaz
Kvostyc 4
čus mám urobenú registráciu cez dini ale ked sa odpojím tak sa mi nevytvára zložka
onplayerdisconnect:
Link to comment
Share on other sites
4 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