Jump to content
godspeedsnake

cutText to systemChat?!?

Recommended Posts

Hey guys,

 

So I have an init line of;

 

[["UH60M","AH64D","B_Heli_Transport_03_unarmed_F"],["PLAYERGUID"], "Helo Pilots only! You are not Authorized!",true,true,true] execVM "server\restrict\restrictHelis.sqf";

 

with an sqf file as such;

 

//waitUntil {player == player};

_this spawn 
{
  while {true} do
  {
    if ((((driver vehicle player == player) && (_this select 5)) || 
    ((gunner vehicle player == player) && (_this select 4)) || 
    ((commander vehicle player == player) && (_this select 3))) && 
    ((vehicle player in (_this select 0)) || 
    (typeOf vehicle player in (_this select 0))) && 
    !((typeOf player in (_this select 1)) || 
    (player in (_this select 1)) || 
    (getPlayerUID player in (_this select 1)))) then
    {
      moveOut player;
      cutText [_this select 2, "PLAIN"];
    };
  sleep 0.1;
  };
};

Now this works like a charm however don't know how to make the cutText systemChat instead :( any help anyone... Pls

Share this post


Link to post
Share on other sites

change

 

cutText [_this select 2, "PLAIN"];

 

to

 

systemChat (_this select 2);

Share this post


Link to post
Share on other sites


/waitUntil {player == player};

_this spawn

{

while {true} do

{

if ((((driver vehicle player == player) && (_this select 5)) ||

((gunner vehicle player == player) && (_this select 4)) ||

((commander vehicle player == player) && (_this select 3))) &&

((vehicle player in (_this select 0)) ||

(typeOf vehicle player in (_this select 0))) &&

!((typeOf player in (_this select 1)) ||

(player in (_this select 1)) ||

(getPlayerUID player in (_this select 1)))) then

{

moveOut player;

systemChat (_this select 2);

};

sleep 0.1;

};

};

Share this post


Link to post
Share on other sites

Tried and tested thank you so much guys  :)  now for a more interesting one I kindOf understand GUID but when I give soldier names I don't know how to change the;

(getPlayerUID player in (_this select 1)

so that I can implement Variable Name instead of GUID?!?  :angry:  No matter what I do fail seem's to be the message of the day  :( so basically in the init I will have something like;

 

P.S Thank you guys so much for the fresh brains, really appreciate the help...

[["UH60M","AH64D","B_Heli_Transport_03_unarmed_F"],["pilot1","pilot2"], "Helo Pilots only! You are not Authorized!",true,true,true] execVM "server\restrict\restrictHelis.sqf";

Share this post


Link to post
Share on other sites

Wouldn't it be more performant to add a getin eh to the coppers, instead of looping through stuff every 0.1 seconds?

I made something similar: https://github.com/DonElSarjo/fata_4_public.fata/blob/master/fnc/fn_respawnTickets.sqf

Have a look

Sure, but it would be much more fun to simply loop every 30 seconds instead. :)  Get in, fly off... get booted midair, boom.  That'll teach you not to try to fly and your teammates not to let you fly. 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×