gms_self_set

Usage: gms_self_set ( "variable", value )

Description

Sets the player's variable to the given value.

Replies (25)

Last message on 5 Jul 2017

Dublann on 21 Jan 2017, 19:10:13
Hi Size,

Im trying to show in a VS room my username and at the same time to see the other player username. For this purpose Im using the gms_self_set function, but Im not sure if im using it correctly.

This is the code Im having in the create event of an object inside the VS room:

gms_self_set("global.mi_nombre",global.mi_nombre)

And another object for reading the other player username has in the create event:

if gms_vs_ready()
{
name=gms_other_get_string(player_id,"name")
}
else
{
name = "ESPERANDO..."
alarm[0]=30//This alarm repeat the code again
}

And in draw event:

draw_set_font(font1)
draw_set_color(c_white)
draw_set_halign(fa_left)
draw_text_outline(x,y,name,2,c_black,16)

The vs config Im having in this website is for 2 players. When I go to this VS room, I cant see the other player username. Am I using correctly the gms_self_set and gms_other_get functions?

Thx!
KadePcGames on 8 Dec 2016, 05:39:20
Can You Ues It Like This???
gms_settings("simple_mode",0,obj_player,obj_other_player)
gms_ini_player_write("admin",562,"yes")
gms_ini_player_exists ("admin",562)
gms_self_name()
gms_self_set ("name","<owner>KadePcGames")
idk im a noob
omarsaurio on 20 Jul 2014, 23:14:19
hey, player variables are saved for how many time? if the player logout or network break, the data continue saved? need something same than player ini but all can read in? any suggest?
mogollon1980 on 5 Jul 2017, 12:10:12
hi i got a question ┬┐how to be a admin?please