Jump to content
Sign in to follow this  
ward1591

How to set script to activate to players in a special list?

Recommended Posts

Hello i have an issue <-- lol no need to say that but whatever. ANYHOW i have a buy vehicle script that would spawn vehicles for me through a GUI. However, i later on wanted to set it so certain people could access that certain vehicle which displays it self originally (BEFORE I TRIED EDITING THE SCRIPT) like so.

createDialog "CarMenu";
ctrlSetText[11120,format["Money: %1",(player getVariable "money")]];
if(side player == west) then
{
lbAdd[11121,"Quad : 5000"];
lbAdd[11121,"Offroad : 7500"];
if (player in list trgswatbase) then {
lbAdd[11121,"Hunter : 10000"];
};
};;

But then i thought what if i changed "if (player in list militaryhq) then {" to "if (player in list sergeant.sqf) then {" maybe it would grab player ids from a .sqf file and use that as reference in stead of someone being on a trigger named "militaryhq".

WHICH THEN TURNED TO LOOK LIKE HIS

createDialog "CarMenu";
ctrlSetText[11120,format["Money: %1",(player getVariable "money")]];
if(side player == west) then
{
lbAdd[11121,"Quad : 5000"];
lbAdd[11121,"Offroad : 7500"];
if (player in list sergeant.sqf) then {
lbAdd[11121,"Hunter : 10000"];
};
};

if(side player == civilian) then
{
lbAdd[11121,"Quad : 5000"];
lbAdd[11121,"Offroad : 7500"];
};

Does anyone know how to reference the script to t a list of player ids instead?

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
Sign in to follow this  

×