Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stupid functions.sqf #612

Merged
merged 46 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1cc038b
move functions client side
blackfisch Feb 15, 2020
4b64f0a
rework all affected functions
blackfisch Feb 15, 2020
ca6aafa
spyglass to lowercase
blackfisch Mar 9, 2020
0069564
git rm functions.sqf
BoGuu Mar 9, 2020
3639c24
Merge branch 'BlackFisch-remove-stupid-functions.sqf'
BoGuu Mar 9, 2020
c2db35f
Appease the new gods
BoGuu Mar 9, 2020
44baf62
rename player_query -> playerQuery
blackfisch Mar 10, 2020
e5ba4df
Merge branch 'remove-stupid-functions.sqf' of https://github.com/Blac…
blackfisch Mar 10, 2020
63e1ac6
spyglass lowercase
blackfisch Mar 10, 2020
b9a73ee
max message length as config setting
blackfisch Mar 10, 2020
c46f1ae
fancy number checking
blackfisch Mar 10, 2020
5a50d4a
Merge branch 'master' into remove-stupid-functions.sqf
blackfisch Mar 11, 2020
55702f4
tested& fixed (prefix wrong)
blackfisch Mar 19, 2020
c6e81e1
Merge branch 'remove-stupid-functions.sqf' of https://github.com/Blac…
blackfisch Mar 19, 2020
fe13833
centralized sendMEssage file instead of 5 single ones
blackfisch Mar 19, 2020
b4ed6a8
Merge branch 'master' into remove-stupid-functions.sqf
blackfisch Mar 19, 2020
8b1f49e
params fix
blackfisch Mar 19, 2020
7f238bb
Merge branch 'remove-stupid-functions.sqf' of https://github.com/Blac…
blackfisch Mar 19, 2020
22a2d5f
remove check since EVH should be working
blackfisch Mar 19, 2020
22c77f0
me stupid, only select for msg to player
blackfisch Mar 19, 2020
752442a
spyglass for dom
blackfisch Mar 19, 2020
734746e
ton_ to life_
blackfisch Mar 19, 2020
f449f66
spyglass for dom #2
blackfisch Mar 19, 2020
71c7947
move terrainsort
blackfisch Mar 19, 2020
ab630f1
Update Altis_Life.Altis/stringtable.xml
blackfisch Mar 19, 2020
e9110aa
newlines and var renaming
blackfisch Mar 19, 2020
bdd91a2
Update Altis_Life.Altis/stringtable.xml
blackfisch Mar 19, 2020
2dea8a4
Merge branch 'master' into remove-stupid-functions.sqf
DomT602 Mar 19, 2020
c1b20bd
rework clientMessage to use string parameter, warning message if no u…
blackfisch Mar 19, 2020
036611e
Merge branch 'remove-stupid-functions.sqf' of https://github.com/Blac…
blackfisch Mar 19, 2020
0d65d9e
more languages
blackfisch Mar 19, 2020
f5d3e5c
grpnull
blackfisch Mar 19, 2020
029097c
more grpnull
blackfisch Mar 19, 2020
f459897
locality for gang stuff etc
blackfisch Mar 21, 2020
b8206f6
stringtable
blackfisch Mar 21, 2020
7c4c48e
tab stuff or whatever
blackfisch Mar 21, 2020
84bed35
jip
blackfisch Mar 21, 2020
1ebc0d4
remtoeexec -> remoteexeccall
blackfisch Mar 21, 2020
4903f00
local check since groupowner is server only
blackfisch Mar 21, 2020
1db636d
Merge branch 'master' into remove-stupid-functions.sqf
BoGuu Mar 25, 2020
dc5380f
Merge branch 'master' into remove-stupid-functions.sqf
DomT602 Mar 25, 2020
1e2cfa9
BE filters
blackfisch Mar 26, 2020
ec6f28c
Merge branch 'master' into remove-stupid-functions.sqf
blackfisch Mar 26, 2020
592d629
Merge branch 'master' into remove-stupid-functions.sqf
DomT602 Apr 3, 2020
40d86a9
Merge branch 'master' into remove-stupid-functions.sqf
DomT602 Apr 13, 2020
8be3611
Update Altis_Life.Altis/core/gangs/fn_gangKick.sqf
BoGuu Apr 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Altis_Life.Altis/Functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,32 @@ class SpyGlass {
};
};

class Tonic {
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
tag = "TON";
class Functions {
file = "core\functions\TON";
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
class clientGangKick {};
class clientGangLeader {};
class clientGangLeft {};
class clientGetKey {};
class clientMessage {};
class index {};
class isNumber {};
class player_query {};
};

class cellphone {
tag = "TON_cell";
file = "core\functions\TON\cell";
class adminmsg {};
class adminmsgall {};
class emsrequest {};
class textadmin {};
class textcop {};
class textmsg {};
};
};

class Life_Client_Core {
tag = "life";

Expand Down
4 changes: 2 additions & 2 deletions Altis_Life.Altis/config/Config_SpyGlass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ class SpyGlass {
};

SERVER_Functions[] = {
"db_fnc_asynccall","db_fnc_bool","db_fnc_insertrequest","db_fnc_insertvehicle","db_fnc_mresarray","db_fnc_mresstring","db_fnc_mrestoarray","db_fnc_numbersafe","db_fnc_queryrequest","db_fnc_updatepartial","db_fnc_updaterequest","ton_fnc_addhouse","ton_fnc_addhouse_meta","ton_fnc_cell_adminmsg","ton_fnc_cell_adminmsgall","ton_fnc_cell_emsrequest","ton_fnc_cell_textadmin","ton_fnc_cell_textcop",
"ton_fnc_cell_textmsg","ton_fnc_chopshopsell","ton_fnc_chopshopsell_meta","ton_fnc_cleanup","ton_fnc_cleanup_meta","ton_fnc_cleanuprequest","ton_fnc_cleanuprequest_meta","ton_fnc_clientdisconnect","ton_fnc_clientdisconnect_meta","ton_fnc_clientgangkick","ton_fnc_clientgangleader","ton_fnc_clientgangleft","TON_fnc_clientGangLeft","ton_fnc_clientgetkey","ton_fnc_clientmessage","ton_fnc_federalupdate",
"db_fnc_asynccall","db_fnc_bool","db_fnc_insertrequest","db_fnc_insertvehicle","db_fnc_mresarray","db_fnc_mresstring","db_fnc_mrestoarray","db_fnc_numbersafe","db_fnc_queryrequest","db_fnc_updatepartial","db_fnc_updaterequest","ton_fnc_addhouse","ton_fnc_addhouse_meta","TON_cell_fnc_adminmsg","TON_cell_fnc_adminmsgall","TON_cell_fnc_emsrequest","TON_cell_fnc_textadmin","TON_cell_fnc_textcop",
"TON_cell_fnc_textmsg","ton_fnc_chopshopsell","ton_fnc_chopshopsell_meta","ton_fnc_cleanup","ton_fnc_cleanup_meta","ton_fnc_cleanuprequest","ton_fnc_cleanuprequest_meta","ton_fnc_clientdisconnect","ton_fnc_clientdisconnect_meta","ton_fnc_clientgangkick","ton_fnc_clientgangleader","ton_fnc_clientgangleft","TON_fnc_clientGangLeft","ton_fnc_clientgetkey","ton_fnc_clientmessage","ton_fnc_federalupdate",
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
"ton_fnc_federalupdate_meta","ton_fnc_fetchplayerhouses","ton_fnc_fetchplayerhouses_meta","ton_fnc_getid","ton_fnc_getid_meta","ton_fnc_getvehicles","ton_fnc_getvehicles_meta","ton_fnc_housecleanup","ton_fnc_housecleanup_meta","ton_fnc_huntingzone","ton_fnc_huntingzone_meta","ton_fnc_index","ton_fnc_inithouses","ton_fnc_inithouses_meta","ton_fnc_insertgang","ton_fnc_insertgang_meta","ton_fnc_isnumber",
"ton_fnc_keymanagement","ton_fnc_keymanagement_meta","ton_fnc_managesc","ton_fnc_managesc_meta","ton_fnc_pickupaction","ton_fnc_pickupaction_meta","ton_fnc_player_query","ton_fnc_queryplayergang","ton_fnc_queryplayergang_meta","ton_fnc_removegang","ton_fnc_removegang_meta","ton_fnc_sellhouse","ton_fnc_sellhouse_meta","ton_fnc_spawnvehicle",
"ton_fnc_spawnvehicle_meta","ton_fnc_spikestrip","ton_fnc_spikestrip_meta","ton_fnc_terrainsort","ton_fnc_terrainsort_meta","ton_fnc_updategang","ton_fnc_updategang_meta","ton_fnc_updatehousecontainers","ton_fnc_updatehousecontainers_meta","ton_fnc_updatehousetrunk","ton_fnc_updatehousetrunk_meta","ton_fnc_vehiclecreate","ton_fnc_vehiclecreate_meta","ton_fnc_vehicledead","ton_fnc_vehicledead_meta",
Expand Down
2 changes: 1 addition & 1 deletion Altis_Life.Altis/core/admin/fn_adminQuery.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ _info = call compile format ["%1", _info];

if (isNil "_info") exitWith {_text ctrlSetText localize "STR_ANOTF_QueryFail";};
if (isNull _info) exitWith {_text ctrlSetText localize "STR_ANOTF_QueryFail";};
[player] remoteExec ["TON_fnc_player_query",_info];
remoteExecCall ["TON_fnc_player_query",_info];
_text ctrlSetText localize "STR_ANOTF_Query";
19 changes: 19 additions & 0 deletions Altis_Life.Altis/core/functions/TON/cell/fn_adminmsg.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
File: fn_adminmsg.sqf
Author: Bryan "Tonic" Boardwine

Description: send message as admin to player
*/
if ((call life_adminlevel) < 1) exitWith {hint localize "STR_CELLMSG_NoAdmin";};

ctrlShow[3020,false];
private _msg = ctrlText 3003;
private _to = call compile format ["%1",(lbData[3004,(lbCurSel 3004)])];
if (isNull _to) exitWith {ctrlShow[3020,true];};
if (isNil "_to") exitWith {ctrlShow[3020,true];};
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
if (_msg isEqualTo "") exitWith {hint localize "STR_CELLMSG_EnterMSG";ctrlShow[3020,true];};

[_msg,name player,3] remoteExecCall ["TON_fnc_clientMessage",_to];
call life_fnc_cellphone;
hint format [localize "STR_CELLMSG_AdminToPerson",name _to,_msg];
ctrlShow[3020,true];
17 changes: 17 additions & 0 deletions Altis_Life.Altis/core/functions/TON/cell/fn_adminmsgall.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
File: fn_adminmsgall.sqf
Author: Bryan "Tonic" Boardwine

Description: send message as admin to all players
*/
if ((call life_adminlevel) < 1) exitWith {hint localize "STR_CELLMSG_NoAdmin";};


ctrlShow[3021,false];
private _msg = ctrlText 3003;
if (_msg isEqualTo "") exitWith {hint localize "STR_CELLMSG_EnterMSG";ctrlShow[3021,true];};

[_msg,name player,4] remoteExecCall ["TON_fnc_clientMessage",-2];
call life_fnc_cellphone;
hint format [localize "STR_CELLMSG_AdminToAll",_msg];
ctrlShow[3021,true];
17 changes: 17 additions & 0 deletions Altis_Life.Altis/core/functions/TON/cell/fn_emsrequest.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
File: fn_emsrequest.sqf
Author: Bryan "Tonic" Boardwine

Description: send message to ems
*/
ctrlShow[3022,false];
private _msg = ctrlText 3003;
private _length = count (toArray(_msg));
if (_length > 400) exitWith {hint localize "STR_CELLMSG_LIMITEXCEEDED";ctrlShow[3022,true];};
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
private _to = "EMS Units";
if (_msg isEqualTo "") exitWith {hint localize "STR_CELLMSG_EnterMSG";ctrlShow[3022,true];};

[_msg,name player,5,mapGridPosition player,player] remoteExecCall ["TON_fnc_clientMessage",independent];
call life_fnc_cellphone;
hint format [localize "STR_CELLMSG_ToEMS",_to,_msg];
ctrlShow[3022,true];
18 changes: 18 additions & 0 deletions Altis_Life.Altis/core/functions/TON/cell/fn_textadmin.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
File: fn_textadmin.sqf
Author: Bryan "Tonic" Boardwine

Description: send message as player to admins
*/
ctrlShow[3017,false];
private _msg = ctrlText 3003;
private _to = "The Admins";

if (_msg isEqualTo "") exitWith {hint localize "STR_CELLMSG_EnterMSG";ctrlShow[3017,true];};
private _length = count (toArray(_msg));
if (_length > 400) exitWith {hint localize "STR_CELLMSG_LIMITEXCEEDED";ctrlShow[3017,true];};

[_msg,name player,2,mapGridPosition player] remoteExecCall ["TON_fnc_clientMessage",-2];
call life_fnc_cellphone;
hint format [localize "STR_CELLMSG_ToPerson",_to,_msg];
ctrlShow[3017,true];
18 changes: 18 additions & 0 deletions Altis_Life.Altis/core/functions/TON/cell/fn_textcop.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
DomT602 marked this conversation as resolved.
Show resolved Hide resolved
File: fn_textcop.sqf
Author: Bryan "Tonic" Boardwine

Description: send message to the police
*/
ctrlShow[3016,false];
_msg = ctrlText 3003;
_to = "The Police";

if (_msg isEqualTo "") exitWith {hint localize "STR_CELLMSG_EnterMSG";ctrlShow[3016,true];};
_length = count (toArray(_msg));
if (_length > 400) exitWith {hint localize "STR_CELLMSG_LIMITEXCEEDED";ctrlShow[3016,true];};

[_msg,name player,1,mapGridPosition player] remoteExecCall ["TON_fnc_clientMessage",west];
[] call life_fnc_cellphone;
hint format [localize "STR_CELLMSG_ToPerson",_to,_msg];
ctrlShow[3016,true];
22 changes: 22 additions & 0 deletions Altis_Life.Altis/core/functions/TON/cell/fn_textmsg.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
File: fn_textmsg.sqf
Author: Bryan "Tonic" Boardwine

Description: send message to another player
*/
ctrlShow[3015,false];
private _msg = ctrlText 3003;

private _length = count (toArray(_msg));
if (_length > 400) exitWith {hint localize "STR_CELLMSG_LIMITEXCEEDED";ctrlShow[3015,true];};
if (lbCurSel 3004 isEqualTo -1) exitWith {hint localize "STR_CELLMSG_SelectPerson"; ctrlShow[3015,true];};

private _to = call compile format ["%1",(lbData[3004,(lbCurSel 3004)])];
if (isNil "_to") exitWith {ctrlShow[3015,true];};
if (isNull _to) exitWith {ctrlShow[3015,true];};
if (_msg isEqualTo "") exitWith {hint localize "STR_CELLMSG_EnterMSG";ctrlShow[3015,true];};

[_msg,name player,0] remoteExecCall ["TON_fnc_clientMessage",_to];
[] call life_fnc_cellphone;
hint format [localize "STR_CELLMSG_ToPerson",name _to,_msg];
ctrlShow[3015,true];
9 changes: 9 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_clientGangKick.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
File: fn_clientGangKick.sqf
Author: Bryan "Tonic" Boardwine

Description: handles being kicked out of a gang
*/
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
life_my_gang = objNull;
[player] joinSilent (createGroup civilian);
hint localize "STR_GNOTF_KickOutGang";
9 changes: 9 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_clientGangLeader.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
File: fn_clientGangLeader.sqf
Author: Bryan "Tonic" Boardwine

Description: appoints player as gang leader
*/
player setRank "COLONEL";
(group player) selectLeader player;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will locality ever serve at issue here? (Prior this was on all units).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik, yes -> https://community.bistudio.com/wiki/selectLeader

has to be executed where unit is local

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is the group?

hint localize "STR_GNOTF_GaveTransfer";
9 changes: 9 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_clientGangLeft.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
File: fn_clientGangLeft.sqf
Author: Bryan "Tonic" Boardwine

Description: leaves the group
*/
life_my_gang = objNull;
[player] joinSilent (createGroup civilian);
hint localize "STR_GNOTF_LeaveGang";
17 changes: 17 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_clientGetKey.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
File: fn_clientGetKey.sqf
Author: Bryan "Tonic" Boardwine

Description: adds key to keychain and displays a message
*/
params [
["_vehicle", objNull, [objNull]],
["_giver", "", [""]]
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
];

if (_vehicle in life_vehicles) exitWith {};

private _name = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName");
hint format [localize "STR_NOTF_gaveKeysFrom",_giver,_name];
life_vehicles pushBack _vehicle;
[getPlayerUID player,playerSide,_vehicle,1] remoteExecCall ["TON_fnc_keyManagement",2];
DomT602 marked this conversation as resolved.
Show resolved Hide resolved
81 changes: 81 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_clientMessage.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
File: fn_clientMessage.sqf
Author: Bryan "Tonic" Boardwine

Description:
displays a received message

0 = private message
1 = police message
2 = message to admin
3 = message from admin
4 = admin message to all
*/
params [
["_msg", "", [""]],
["_from", "", [""]],
["_type", 0, [0]],
["_loc", "Unknown", [""]]
];

if (_from isEqualTo "" || {_msg isEqualTo ""}) exitWith {};
private _message = "";

switch (_type) do {
case 0 : {
_message = format [">>>MESSAGE FROM %1: %2",_from,_msg];
hint parseText format ["<t color='#FFCC00'><t size='2'><t align='center'>New Message<br/><br/><t color='#33CC33'><t align='left'><t size='1'>To: <t color='#ffffff'>You<br/><t color='#33CC33'>From: <t color='#ffffff'>%1<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%2",_from,_msg];

["TextMessage",[format ["You Received A New Private Message From %1",_from]]] call bis_fnc_showNotification;
};

case 1 : {
if !(playerSide isEqualTo west) exitWith {};
_message = format ["--- 911 DISPATCH FROM %1: %2",_from,_msg];

hint parseText format ["<t color='#316dff'><t size='2'><t align='center'>New Dispatch<br/><br/><t color='#33CC33'><t align='left'><t size='1'>To: <t color='#ffffff'>All Officers<br/><t color='#33CC33'>From: <t color='#ffffff'>%1<br/><t color='#33CC33'>Coords: <t color='#ffffff'>%2<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%3",_from,_loc,_msg];

["PoliceDispatch",[format ["A New Police Report From: %1",_from]]] call bis_fnc_showNotification;
};

case 2 : {
if ((call life_adminlevel) < 1) exitWith {};
_message = format ["!!! ADMIN REQUEST FROM %1: %2",_from,_msg];

hint parseText format ["<t color='#ffcefe'><t size='2'><t align='center'>Admin Request<br/><br/><t color='#33CC33'><t align='left'><t size='1'>To: <t color='#ffffff'>Admins<br/><t color='#33CC33'>From: <t color='#ffffff'>%1<br/><t color='#33CC33'>Coords: <t color='#ffffff'>%2<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%3",_from,_loc,_msg];

["AdminDispatch",[format ["%1 Has Requested An Admin!",_from]]] call bis_fnc_showNotification;
};

case 3 : {
_message = format ["!!! ADMIN MESSAGE: %1",_msg];
_admin = format ["Sent by admin: %1", _from];
hint parseText format ["<t color='#FF0000'><t size='2'><t align='center'>Admin Message<br/><br/><t color='#33CC33'><t align='left'><t size='1'>To: <t color='#ffffff'>You<br/><t color='#33CC33'>From: <t color='#ffffff'>An Admin<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%1",_msg];

["AdminMessage",["You Have Received A Message From An Admin!"]] call bis_fnc_showNotification;
if ((call life_adminlevel) > 0) then {systemChat _admin;};
};

case 4 : {
_message = format ["!!!ADMIN MESSAGE: %1",_msg];

hint parseText format ["<t color='#FF0000'><t size='2'><t align='center'>Admin Message<br/><br/><t color='#33CC33'><t align='left'><t size='1'>To: <t color='#ffffff'>All Players<br/><t color='#33CC33'>From: <t color='#ffffff'>The Admins<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%1",_msg];

["AdminMessage",["You Have Received A Message From An Admin!"]] call bis_fnc_showNotification;
if ((call life_adminlevel) > 0) then {
private _admin = format ["Sent by admin: %1", _from];
systemChat _admin;
};
};

case 5: {
if !(playerSide isEqualTo independent) exitWith {};

_message = format ["!!! EMS REQUEST: %1",_msg];
hint parseText format ["<t color='#FFCC00'><t size='2'><t align='center'>EMS Request<br/><br/><t color='#33CC33'><t align='left'><t size='1'>To: <t color='#ffffff'>You<br/><t color='#33CC33'>From: <t color='#ffffff'>%1<br/><t color='#33CC33'>Coords: <t color='#ffffff'>%2<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%3",_from,_loc,_msg];

["TextMessage",[format ["EMS Request from %1",_from]]] call bis_fnc_showNotification;
};
};

systemChat _message;
12 changes: 12 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_index.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
File: fn_index.sqf
Author: Bryan "Tonic" Boardwine

Description: return index of _item in _stack
*/
params [
"_item",
["_stack",[],[[]]]
];

_stack findIf {_item in _x};
15 changes: 15 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_isNumber.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
File: fn_isNumber.sqf
Author: Bryan "Tonic" Boardwine

Description: determines whether or not a string represents a valid number
*/
params [
["_string","",[""]]
];
if (_string isEqualTo "") exitWith {false};
private _array = _string splitString "";

{
!(_x in ["0","1","2","3","4","5","6","7","8","9"]);
} count _array > 0;
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 10 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_player_query.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
File: fn_player_query.sqf
Author: Bryan "Tonic" Boardwine

Description:
pass local variables to admin
*/
if (!isRemoteExecuted) exitWith {};

[life_atmbank,life_cash,owner player,player,profileNameSteam,getPlayerUID player,playerSide] remoteExecCall ["life_fnc_adminInfo",remoteExecutedOwner];
2 changes: 1 addition & 1 deletion Altis_Life.Altis/core/gangs/fn_gangKick.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (!(_members isEqualType [])) exitWith {};
_members = _members - [_unitID];
group player setVariable ["gang_members",_members,true];

[_unit,group player] remoteExec ["TON_fnc_clientGangKick",_unit]; //Boot that bitch!
remoteExecCall ["TON_fnc_clientGangKick",_unit]; //Boot that bitch!

if (life_HC_isActive) then {
[4,group player] remoteExec ["HC_fnc_updateGang",HC_Life]; //Update the database.
Expand Down
2 changes: 1 addition & 1 deletion Altis_Life.Altis/core/gangs/fn_gangLeave.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (!(_members isEqualType [])) exitWith {};
_members = _members - [_unitID];
group player setVariable ["gang_members",_members,true];

[player,group player] remoteExec ["TON_fnc_clientGangLeft",player];
call TON_fnc_clientGangLeft;

if (life_HC_isActive) then {
[4,group player] remoteExec ["HC_fnc_updateGang",HC_Life]; //Update the database.
Expand Down
2 changes: 1 addition & 1 deletion Altis_Life.Altis/core/gangs/fn_gangNewLeader.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (_action) then {
if (_unitID isEqualTo "") exitWith {hint localize "STR_GNOTF_badUID";}; //Unlikely?
group player setVariable ["gang_owner",_unitID,true];
group player selectLeader _unit;
[_unit,group player] remoteExec ["TON_fnc_clientGangLeader",_unit]; //Boot that bitch!
remoteExecCall ["TON_fnc_clientGangLeader",_unit]; //Boot that bitch!
blackfisch marked this conversation as resolved.
Show resolved Hide resolved

if (life_HC_isActive) then {
[3,group player] remoteExec ["HC_fnc_updateGang",HC_Life]; //Update the database.
Expand Down
2 changes: 1 addition & 1 deletion Altis_Life.Altis/core/gangs/fn_initGang.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (!isNil "_group") then {
[player] join _group;
if ((life_gangData select 1) isEqualTo getPlayerUID player) then {
_group selectLeader player;
[player,_group] remoteExecCall ["TON_fnc_clientGangLeader",(units _group)];
call TON_fnc_clientGangLeader;
};
} else {
_group = group player;
Expand Down
2 changes: 1 addition & 1 deletion Altis_Life.Altis/core/pmenu/fn_keyGive.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ if (_index isEqualTo -1) then {
};

hint format [localize "STR_NOTF_givenKeysTo",_unit getVariable ["realname",name _unit],typeOf _vehicle];
[_vehicle,_unit,profileName] remoteExecCAll ["TON_fnc_clientGetKey",_unit];
[_vehicle,profileName] remoteExecCall ["TON_fnc_clientGetKey",_unit];
Loading