aight so i made a few fixes and now it works:
object_event_add(SpawnPointRed, ev_create, 0, '
if(!variable_global_exists("clientCommandMap")){
global.clientCommandMap = ds_map_create();
}
if(!variable_global_exists("helpMap")){
global.helpMap = ds_map_create();
}
ds_map_add(global.clientCommandMap,"dicks","
playerId = 255;
_team = 0;
if(global.isHost) {
messageToBroadcast = ds_list_find_value(argument0,1);
_message = '+"'O[CONSOLE] '+string(messageToBroadcast);
_message = string_replace_all(_message,'#',' ');
event_user(2);
event_user(4);
}
else if(global.isHost)
{
_message = 'OThis command can only be executed by the host.';
event_user(4);
}
"+'");
ds_map_add(global.helpMap,"dicks","Sends a broadcast message");
');
only problem
when you type /help
you get this error
___________________________________________
ERROR in
action number 1
of Other Event: User Defined 9
for object __newobject834:
Error in code at line 10:
_message += ', '+previous;
^
at position 30: Wrong type of arguments to +.
edit:
i added this code and it seems to fix it for the time
only problem
now /help is disabled
if(ds_map_exists(global.clientCommandMap, "help")){
ds_map_delete(global.clientCommandMap, "help");
}
if(ds_map_exists(global.commandMap, "help")){
ds_map_delete(global.commandMap, "help");
}
ds_map_add(global.clientCommandMap,"help","
_message = '+"'ODisabled because other plugins break with this on.'"+';
playerId = 255;
_team = 0;
target = _player;
if target != global.myself event_user(2);
else event_user(4);
");
ds_map_add(global.commandMap,"help","
_message = '+"'ODisabled because other plugins break with this on.'"+';
playerId = 255;
_team = 0;
target = _player;
if target != global.myself event_user(2);
else event_user(4);
");
ds_map_add(global.helpMap,"help","Disabled (this is here just in case it fixes)");