03.02.2018, 06:01
I have some doubts about the global variables, I hope that someone can answer me, greetings.
I have the following variable in my gamemode (at least 10 equals)
I use it to give you the id of a house
So, if player X is using this variable (at least it is in 5 consecutive house functions) and player Y uses the /house command at the same time the value of HouseID would change completely to the house closest to it, so both the HouseID value of player X will not be worth the same as when he use the command .. right?
Then, the solution to that would be the following:
And
But, if I want to add sell the house by dialogues, I can not use HouseID [playerid] since in the playerid dialog it would be the id of the player Y (to whom the house will be sold)
What can I do in this case? .. the same thing happens to me in 3 different opportunities, not only with the system of houses .. can someone help me ?, thanks!
I have the following variable in my gamemode (at least 10 equals)
Код:
new HouseID;
Код:
HouseID = i; (i = GetNearestHouseID(playerid))
Then, the solution to that would be the following:
Код:
new HouseID[MAX_PLAYERS];
Код:
HouseID[playerid] = i (i = GetNearestHouseID(playerid))
What can I do in this case? .. the same thing happens to me in 3 different opportunities, not only with the system of houses .. can someone help me ?, thanks!