gms_other_find_by_name

Usage: gms_other_find_by_name ( name )

Description

Returns the player_id of the player with the given name. Returns -1 when the player wasn't found.

Example

var player_id, size43_health;
player_id = gms_other_find_by_name("Size43")
size43_health = gms_other_get_real(player_id, "health");
show_message("Size43: "+string(size43_health)+" health left");

Replies (2)

Last message on 24 Mar 2018

AouabAdYT on 21 Mar 2018, 22:12:32
size43_health = gms_other_get_real("health");


Should normally be :

size43_health = gms_other_get_real(player_id,"health");


You forgot an argument :)
Size43 (Administrator) on 24 Mar 2018, 15:21:06
Thanks, fixed!