Jump to content

pomoc Divné proměnné


Recommended Posts

čauko mam problém, mam pole proměnných a to co dosadim v jedný se vypíše i u ostatních ...

 

mam tu kod co sem zkusil

public OnPlayerSpawn(playerid)
{
    new houseid = 4;
    UserData[playerid][my_house] = houseid;
    UserData[playerid][in_house] = 0;
    new strings[256],string1[255];
    format(strings,256,"=> %d",UserData[playerid][my_house]);
    SendClientMessage(playerid,0xFF0000AA,strings);
    format(string1,256,"=> %d",UserData[playerid][in_house]);
    SendClientMessage(playerid,0xFF0000AA,string1);
    return 1;
}

Oba SCM vypíšou stejnou hodnotu mají vypsat 4 a 0 a vypíšou 0 a 0 .. nechápu o co jde...

Link to comment
Share on other sites

public OnPlayerSpawn(playerid)
{
new houseid = 4;
UserData[playerid][my_house] = houseid;
UserData[playerid][in_house] = 0;
new strings[256],string1[255];
format(strings,256,"%d => %d",my_house,UserData[playerid][my_house]);
SendClientMessage(playerid,0xFF0000AA,strings);
format(string1,256,"%d => %d",in_house,UserData[playerid][in_house]);
SendClientMessage(playerid,0xFF0000AA,string1);
return 1;
}

mam dojem ze to pole nastavujes v obou dvou pripadech na stejnem indexu

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...