/Cuff not working with Skins COPS
#1

Hi everyone I make /cuff system its worked But there is a small Problem

When i joined Cops Skin 280 its not work and if i joined Army Skin 287 not Work ... Its only work with skin 287 Why??

Код:
CMD:cuff(playerid, params[])
{
    new targetid;
    if(GetPlayerSkin(playerid) != 285 && 280 && 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Place only For SWAT, you are not Police");
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /cuff [Part of Name/Player ID]");
    if(IsPlayerConnected(targetid))
        {
            new Float:x, Float:y, Float:z;
               GetPlayerPos(playerid, x, y, z);
               if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
                   {
                    new str[512];
                      new name[MAX_PLAYER_NAME];
                       GetPlayerName(playerid, name, sizeof(name));
                       new target[MAX_PLAYER_NAME];
                       GetPlayerName(targetid, target, sizeof(target));
                       format(str, sizeof(str), "INFO: You have cuffed %s!",target);
                       SendClientMessage(playerid, 0xE01B1B, str);
                       format(str, sizeof(str), "WARNING: You have been cuffed by %s!",name);
                       SendClientMessage(targetid, 0xE01B1B, str);
                       SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);
                      SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED);
                      return 1;
                }

        }
    return 1;
}
I Placed the Skins Ids its only work SWAT
Reply
#2

if(GetPlayerSkin(playerid) != 285 && 280 && 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Place only For SWAT, you are not Police");

replace with

if(!GetPlayerSkin(playerid) == 285 && 280 && 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Place only For SWAT, you are not Police");

test it and let me know if this worked.
Reply
#3

Quote:
Originally Posted by 025Tadija
Посмотреть сообщение
if(GetPlayerSkin(playerid) != 285 && 280 && 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Place only For SWAT, you are not Police");

replace with

if(!GetPlayerSkin(playerid) == 285 && 280 && 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Place only For SWAT, you are not Police");

test it and let me know if this worked.
Omg? You let it /Cuff for all skins? I need it For Cops Only Man
Reply
#4

Try it like this:

PHP код:
new sk;
sk GetPlayerSkin(playerid);
if(
sk != 285 || sk != 280 || sk != 287) return SendClientMessage(playerid, -1"{FF0000}Sorry This Place only For SWAT, you are not Police"); 
Reply
#5

Try This
Код:
if(!GetPlayerSkin(playerid) == 285 & 280 & 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Command only For Cops, you are not Police");
Reply
#6

not work guyz Please help
Reply
#7

Oh, try this

Код:
if(!GetPlayerSkin(playerid) == 285 || 280 || 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Command only For Cops, you are not Police");
my bad was && that means that player must have all 3 skins at the same time, which is impossible.
Reply
#8

Retry my code, I've edited it.
Reply
#9

Quote:
Originally Posted by saffierr
Посмотреть сообщение
Try it like this:

PHP код:
new sk;
sk GetPlayerSkin(playerid);
if(
sk != 285 || sk != 280 || sk != 287) return SendClientMessage(playerid, -1"{FF0000}Sorry This Place only For SWAT, you are not Police"); 
Hello Your Code given me Many ERRORS. Not Worked!!!

Quote:
Originally Posted by 025Tadija
Посмотреть сообщение
Oh, try this

Код:
if(!GetPlayerSkin(playerid) == 285 || 280 || 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Command only For Cops, you are not Police");
my bad was && that means that player must have all 3 skins at the same time, which is impossible.
Hello Your code given me 0 Errors but You given me a code not worked with all skins NOW! SO I CANT USE IT!!


PLEASE HEEEEEEEEEEELP
Reply
#10

Try changing the &&'s to ||, not sure if it'll do anything but it's worth a shot.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)