26.06.2015, 20:56
I would like to make a mask system similar to LSRP, but it is almost done, the only thing that left is to make let players input the ID of the mask instead of a player name or ID in commands without requiring the ID, this is what I got so far. This function will be used in commands to check if the Mask ID is active and it will return the player ID instead.
pawn Код:
IsMasked(target)
{
new player, MaskName[64];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsMaskOn{i})
{
format(MaskName, sizeof(MaskName), "%d_%d", GetMaskLargeID(i), GetMaskSmallID(i));
if(strcmp(MaskName, target)) // Error here, no idea what to do to check if a string is the same with another.
{
player = i;
}
}
}
}
return player;
}