Mask System ID's
#1

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.
Reply
#2

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
Reply
#3

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.
Reply
#4

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
Reply
#5

pawn Код:
IsMasked(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConneted(i))
        {
            if(IsPlayerMasked[playerid])
            {
                if(GetPlayerMaskID(playerid) ==
No idea what to do then lol
Reply
#6

Quote:
Originally Posted by dionisak0s
Посмотреть сообщение
pawn Код:
IsMasked(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConneted(i))
        {
            if(IsPlayerMasked[playerid])
            {
                if(GetPlayerMaskID(playerid) ==
No idea what to do then lol
PHP код:
IsMasked(target)
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConneted(i))
        {
            if(
IsPlayerMasked[i])
            {
                if(
GetPlayerMaskID(target)) {
                         return 
target;
                    } 
that's an example
Reply
#7

It shows an error, which is error 033: array must be indexed (variable "GetPlayerMaskID")
Reply
#8

GetPlayerMaskID should be a function for the above script to work.
Reply
#9

Quote:
Originally Posted by rappy93
Посмотреть сообщение
GetPlayerMaskID should be a function for the above script to work.
^ Ignore him..

PHP код:
IsMasked(target)
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConneted(i))
        {
            if(
IsPlayerMasked[i])
            {
                    new 
MaskID GetPlayerMaskID(i);
                if(
MaskID == target) {
                         return 
i;
                    } 
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)