Hey . I would like to ask you for help with my problem.
I need to call the script to everyone on server when multiplayer mission ends.
In that way this script work well :
But If I want call this script on ti_on_multiplayer_mission_end nothing usefull happens . Acces logs for my database is empty.
Anyone can help me? There is code from script_save_player_gold (work)
Also I can't use try_for_players.
Thanks for reading, Pitch
I need to call the script to everyone on server when multiplayer mission ends.
In that way this script work well :
Code:
(ti_on_player_exit, 0, 0, [],
[
(store_trigger_param_1, ":player_no"),
(call_script, "script_save_player_gold", ":player_no"),
]),
But If I want call this script on ti_on_multiplayer_mission_end nothing usefull happens . Acces logs for my database is empty.
(ti_on_multiplayer_mission_end, 0, 0, [],
[
(get_max_players, ":num_players"),
(try_for_range, ":player_no", 1, ":num_players"),
(player_is_active, ":player_no"),
(call_script, "script_save_player_gold", ":player_no"),
(try_end),
##MB CODE
(call_script, "script_multiplayer_event_mission_end"),
(assign, "$g_multiplayer_stats_chart_opened_manually", 0),
(start_presentation, "prsnt_multiplayer_stats_chart"),
]),
Anyone can help me? There is code from script_save_player_gold (work)
Code:
("save_player_gold",[
(store_script_param_1, reg0),#must be active
(player_get_unique_id, reg1, reg0),
(player_get_gold, reg2, reg0),
(str_store_player_username, s0, reg0),
(send_message_to_url, "@http://secret/example.php?unique%5Fid={reg1}&local%5Fid={reg0}&event=2&username={s0}&gold={reg2}"),
(display_message, "@Debug"),
]),
Also I can't use try_for_players.
Thanks for reading, Pitch