Posts: 252
Threads: 48
Joined: May 2013
Reputation:
0
I am currently working on a mask system which generates random ID's when you use it, it's quiet similar to LSRP's but I am in need of something like /pay 33121_2311 or whatever so the player X may pay the player Y without the player X revealing his ID.
Posts: 228
Threads: 25
Joined: Jan 2015
Reputation:
0
Pretty easily done...
Make a stock function..
In that stock function....
1, Is the player masked
2, What is there mask ID [ How are you storing the mask ID ]
3, Return the players ID
Posts: 252
Threads: 48
Joined: May 2013
Reputation:
0
Already done the first two things, added the thing to work on almost every command, but now I want to make the system even better and I can't figure out how to return player ID's when the correct Mask ID is used on a command, if I type in-game /pay 123213_123 it will return invalid player id.
Posts: 228
Threads: 25
Joined: Jan 2015
Reputation:
0
If you are checking if the person is masked.
And you have a method of storing each mask per player.
Simply make a stock function...
example
/pay 123_123 1
Once typed.
IT would go to the function...
.
IsMasked(playerid) {
Make a foreach statement..
Loop through all connected players
if the player is connected {
Do they have a mask on
If they have a mask on {
Is there mask ID == to the input ID of /pay
if it is == to the input ID of the mask
SIMPLY
return i
Once returned i;
It will return back to the /pay command
i == target
Posts: 252
Threads: 48
Joined: May 2013
Reputation:
0
It shows an error, which is error 033: array must be indexed (variable "GetPlayerMaskID")
Posts: 449
Threads: 20
Joined: Mar 2012
Reputation:
0
GetPlayerMaskID should be a function for the above script to work.
Posts: 252
Threads: 48
Joined: May 2013
Reputation:
0
GetPlayerMaskID is a stock for me which checks if a player is wearing a mask and returns Stranger %d_%d, or else his name. If I go in-game the message should be like this once I type /mask Stranger 123456_12, actually it generates a random number whenever a player is using the command.
Edit 2: The code above doesn't works.