gms_other_get_real
Usage: gms_other_get_real ( player_id, "variable" )
Description
Returns the value saved in the given player's variable. If the variable doesn't exist, or the variable is a string, 0 (zero) is returned.
Replies (2)
Last message on 26 Dec 2016
Hi Size!
in order to use this function, is necessary to have identified before a variable using gms_self_set or is not necessary? I mean, I want to get a variable of the other player (1vs1) and work with its value, and I dont know if I can call a general variable of the game like "global.my_country" or if is necessary to use gms_self_set(gms_location_countryname()),global.my_country) and then, call the global.my_country
Thx!
Zecca
on
26 Dec 2016, 17:16:03
Yes, you have to set the variable first with gms_self_set("my_country",gms_location_countryname())
and on the other clients gms_other_get_string(player_id,"my_country")
I use "get_string" cause the gms_location_countryname() from help say it returns the full country name, so better use a string.
I hope that help