Jump to content
  • 0

pomoc Uložení promnene v registraci


Daxic

Dotaz

DObry den potřeboval bych pomoct mám registraci a v ní chci aby se po odlognutí se uložila proměná a při načtení se načetla problem je v tom že nevím jak se ukládají promené.

Link to comment
Share on other sites

8 odpovědí na tuto otázku

Recommended Posts

  • 0

lol ja mam dudb reg a ked dam pod to tak mi pise warning ze mam 2x nadefinovany v includ :d kto by mal to opravene dajte mi upload includy

dudb

dutils

Y_Objects

 

Thank You :boss:

Link to comment
Share on other sites

  • 0

nwm čím to je žádné errory to neháže ale ani to tu proměnou neuloží ...

nebo nenačte

Tady je Disconnect:

 

public OnPlayerDisconnect(playerid, reason)

{

if (PLAYERLIST_authed[playerid]) {

dUserSetINT(PlayerName(playerid)).("money",GetPlayerMoney(playerid));

dUserSetINT("PlayerName").("povol",povolani[playerid]);

}

PLAYERLIST_authed[playerid]=false;

return 1;

}

 

Tady je pokud napíše /login heslo :

 

if (strlen(params)==0) return SystemMsg(playerid,"Login with: '/login password'");

 

if (udb_CheckLogin(PlayerName(playerid),params)) {

 

GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money")-GetPlayerMoney(playerid));

povolani[playerid] = dUserINT(PlayerName(playerid)).("povol");

 

PLAYERLIST_authed[playerid]=true;

 

return SystemMsg(playerid,"Successfully authed!");

}

return SystemMsg(playerid,"Login is failed!");

 

A tady je to jak by se mnelo projevit jestli to je správne:

 

public OnPlayerSpawn(playerid)//vybírání skinu

{

if(povolani[playerid] == 0)

{

AddPlayerClass(34, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(243, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(239, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(291, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(47, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(130, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(131, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(135, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(94, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(128, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(137, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(159, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(162, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

}

if(povolani[playerid] == 4)

{

SetPlayerColor(playerid,0xFF0000FF);

SetPlayerSkin(playerid,217);

GivePlayerWeapon(playerid,4,1);

GivePlayerWeapon(playerid,24,10);

SetPlayerPos(playerid,1243.1223,331.4654,19.5547);

}

else

if(povolani[playerid]== 1)

{

SetPlayerColor(playerid,0x666666FF);

SetPlayerSkin(playerid,50);

SetPlayerPos(playerid,1243.1223,331.4654,19.5547);

}

else

if(povolani[playerid]== 2)

{

SetPlayerColor(playerid,0xFF7700FF);

SetPlayerSkin(playerid,71);

SetPlayerPos(playerid,1243.1223,331.4654,19.5547);

}

else

if(povolani[playerid]==3)

{

SetPlayerColor(playerid,0x8800FFFF);

SetPlayerSkin(playerid,61);

SetPlayerPos(playerid,1243.1223,331.4654,19.5547);

}

else

if(povolani[playerid]== 5)

{

SetPlayerColor(playerid,0xFFEE00FF);

SetPlayerSkin(playerid,66);

SetPlayerPos(playerid,1243.1223,331.4654,19.5547);

}

else

if(povolani[playerid] == 6)

{

SetPlayerColor(playerid,0x1100FFFF);

SetPlayerSkin(playerid,283);

SetPlayerPos(playerid,1243.1223,331.4654,19.5547);

}

else

if(povolani[playerid] == 7)

{

SetPlayerColor(playerid,0x00FFEEFF);

SetPlayerSkin(playerid,276);

SetPlayerPos(playerid,1243.1223,331.4654,19.5547);

}

return 1;

}

 

A jinak ta promená se mi nastavuje ... prosím pomocte

Link to comment
Share on other sites

  • 0

LoL to:

 

AddPlayerClass(34, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(243, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(239, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(291, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(47, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(130, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(131, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(135, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(94, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(128, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(137, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(159, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

AddPlayerClass(162, 1243.1223,331.4654,19.5547,331.2053, 0, 0, 0, 0, 0, 0); //3 P

 

dej do OnGameModeInt jinak rači nekoukam :d

Link to comment
Share on other sites

  • 0

chyba je zde

dUserSetINT("PlayerName").("povol",povolani[playerid]);

to ti vytvori soubor PlayerName,dudb.sav a ne jmeno toho hrace

takto si to udelej

dUserSetINT(PlayerName(playerid)).("povol",povolani[playerid]);

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...