I need help check ID mask for player
#1

Hello everybody ! i need your help?
I want to check the player's mask ID when they buy the mask and have their own mask ID.
And I want to check who is behind the mask ID?
Example: /checkmask [3300]
=>
Код:
format(str, sizeof(str), " ID Mask 3300 of Player A", PlayerInfo[playerid][pMaskID], GetPlayerNameEx(i));
ID 3300 here is ID Mask when I buy mask at 24/7 and random ID + Save Row

The code is only a part but I have not finished yet?
Reply
#2

This one is using zcmd...

Код:
CMD:checkmask(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR, "Usage:/checkmask [ID]");
    new msg[128], name[MAX_PLAYER_NAME];
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR, "This player is not online!");
    
    GetPlayerName(id, name, sizeof(name));
    format(msg, sizeof(msg), "Player:%s[%u], mask ID:%i", name, id, PlayerInfo[id][pMaskID]);
    SendClientMessage(playerid, COLOR, msg); 

    return 1;
}
Hope it helped...

EDIT:If you have an admin system add:

Код:
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerd, COLOR, "You're not authorized to use this command!");
on top of the command...
Reply
#3

Код:
new id = PlayerInfo[playerid][pMaskID]
I want check ID Mask [3300] >> Name Player, but not check ID player

Sorry bad english
Reply
#4

helpp
Reply
#5

Код:
CMD:whosmask(playerid, params[])
{
    new string[128], masked;

    if(sscanf(params, "d", mask))
         return SendClientMessage(playerid, -1, "Usage: /whosmask [mask ID]");

   foreach(new i : Player)
   {
        if(masked == 0) return SendClientMessage(playerid, -1, "0 is the default value.");
        if(masked == Player[i][pMaskID])
        {
            format(string, sizeof(string), "Mask ID %d is: %s", mask, YourReturnNameFunction);
            SendClientMessage(playerid, -1, string);
         }
   }
   return 1;
}
Try that. I'm not too sure what you're asking but I think this is it.
Reply
#6

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Код:
CMD:whosmask(playerid, params[])
{
    new string[128], masked;

    if(sscanf(params, "d", mask))
         return SendClientMessage(playerid, -1, "Usage: /whosmask [mask ID]");

   foreach(new i : Player)
   {
        if(masked == 0) return SendClientMessage(playerid, -1, "0 is the default value.");
        if(masked == Player[i][pMaskID])
        {
            format(string, sizeof(string), "Mask ID %d is: %s", mask, YourReturnNameFunction);
            SendClientMessage(playerid, -1, string);
         }
   }
   return 1;
}
Try that. I'm not too sure what you're asking but I think this is it.
Thank ! that's what I need
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)