Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Some client function (before cleanup)
- [getPlayerUID player,profileName,CASH,_bank,player] remoteExecCall ["DB_fnc_insertRequest",RSERV];
- // Some client function (after cleanup)
- 0 remoteExecCall ["DB_fnc_insertRequest",2];
- // Function on the server
- DB_fnc_insertRequest = {
- // Ignore headless clients
- if (remoteExecutedOwner isEqualTo 0) exitWith {}; // headless client
- // Let server determine source of call by itself, not by arbitrary data.
- private _players = allPlayers select {(owner _x) isEqualTo remoteExecutedOwner};
- if (_players isEqualTo []) exitWith {};
- private _player = _players select 0;
- private _uid = getPlayerUID _player;
- private _name = _player getVariable['realname','none'];
- // ... whatever your code is supposed to do here, no client data input involved at any point.
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement