Jump to content
  • 0

Systemchat format to selected player


JakeQue

Question

Hi,

 

I'm trying to alert a user that their base is being broken into. The script already fetches the  _ownerID                 = _CursorTarget getVariable ["ownerPUID","0"];

How do I systemchat format to the object owner?

For example: 

 _ownerID = _cursorTarget getVariable ["ownerPUID","0"];

 systemChat(format["SOMEONE IS TRYING TO BREAK INTO %1 s BASE ",_ownerID)]);

This would put it to everyone but I need to just put it to the owner of that object.

Can you do? :

 _ownerID = _cursorTarget getVariable ["ownerPUID","0"];

 _ownerID systemChat(format["SOMEONE IS TRYING TO BREAK INTO YOUR BASE!")]);

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

I use this code to do a similar job:

Quote

[nil,_x,"loc",rTITLETEXT,"Use the key to unlock the car outside.","PLAIN DOWN",5] call RE;

_x is the player to warn. 

If you finish messing up WAI, you can use remote_message for it

Quote

RemoteMessage = ["titleCut","WARNING: You are approaching a minefield! Stop and continue on foot."];
(owner _x) publicVariableClient "RemoteMessage";

also, _x is the player to warn. 

 

 

by the way,

22 hours ago, JakeQue said:

 systemChat(format["SOMEONE IS TRYING TO BREAK INTO %1 s BASE ",_ownerID)]);

you have a typo after _owenerID.  and...

_cursorTarget getVariable ["ownerPUID","0"]; 

...what are you looking at?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...