Cuff System 0.3e [HELP]
#1

Im using The cuff System 0.3E ,
My problem In details :

When u Get Cuffed It works Fine , But when u get Uncuffed The cuffs keep beeing On your Right Hand



The lines :'



CUFF LINES

PHP код:
    if(strcmp(cmd"/cuff"true) == || strcmp(cmd"/cu"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
IsACop(playerid) || IsAFreecop(playerid))
            {
                
tmp strtok(cmdtextidx);
                if(!
strlen(tmp)) {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /cuff [Playerid/PartOfName]");
                    return 
1;
                }
                if(
PlayerInfo[playerid][pDBanned] == 1)
                {
                    
SendClientMessage(playeridCOLOR_GREY"* You are Banned From Cop Duty!");
                    return 
1;
                }
                if(
PlayerInfo[playerid][pDuty] == 0)
                {
                    
SendClientMessage(playeridCOLOR_GREY"* You aren't on Duty!");
                    return 
1;
                }
                
giveplayerid ReturnUser(tmp);
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(
IsACop(giveplayerid) || IsAFreecop(giveplayerid))
                        {
                            
SendClientMessage(playeridCOLOR_GREY"* You can't Cuff Cops !");
                            return 
1;
                        }
                        if(
PlayerCuffed[giveplayerid] > 0)
                        {
                            
SendClientMessage(playeridCOLOR_GREY"* Player already Cuffed !");
                            return 
1;
                        }
                        if (
ProxDetectorS(8.0playeridgiveplayerid))
                        {
                            if(
giveplayerid == playerid) return SendClientMessage(playeridCOLOR_GREY"You cannot cuff yourself!");
                            
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                              
format(stringsizeof(string), "* You were Cuffed by %s, till uncuff."sendername);
                            
SendClientMessage(giveplayeridCOLOR_WHITEstring);
                            
format(stringsizeof(string), "* You Cuffed %s, till uncuff."giveplayer);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                            
format(stringsizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere."sendername ,giveplayer);
                            
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                            
GameTextForPlayer(giveplayerid"~r~Cuffed"25003);
                            
TogglePlayerControllable(giveplayerid0);
                            
PlayerCuffed[giveplayerid] = 1;
                            
SetPlayerSpecialAction(giveplayeridSPECIAL_ACTION_CUFFED);
                            
SetPlayerAttachedObject(giveplayerid0194186, -0.0110000.028000, -0.022000, -15.600012, -33.699977, -81.7000350.8919991.0000001.168000);
                            
cufftimer[giveplayerid] = SetTimerEx("CheckDist",10000,true,"ii",giveplayerid,playerid);
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_GREY"* That player is not near you !");
                            return 
1;
                        }
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"* That player is Offline !");
                    return 
1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"* You are not a Cop / FBI / National Guard !");
            }
        }
        return 
1;
    } 

UNCUFF LINES

PHP код:
    if(strcmp(cmd"/uncuff"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
IsACop(playerid))
            {
                
tmp strtok(cmdtextidx);
                if(!
strlen(tmp)) {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /uncuff [Playerid/PartOfName]");
                    return 
1;
                }
                
giveplayerid ReturnUser(tmp);
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if (
ProxDetectorS(8.0playeridgiveplayerid))
                        {
                            if(
giveplayerid == playerid) { SendClientMessage(playeridCOLOR_GREY"You cannot Uncuff yourself!"); return 1; }
                            if(
PlayerCuffed[giveplayerid])
                            {
                                
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                                
format(stringsizeof(string), "* You were Uncuffed by %s, you can now run away or give up again."sendername);
                                
SendClientMessage(giveplayeridCOLOR_WHITEstring);
                                
format(stringsizeof(string), "* You Uncuffed %s."giveplayer);
                                
SendClientMessage(playeridCOLOR_WHITEstring);
                                
GameTextForPlayer(giveplayerid"~g~Uncuffed"25003);
                                
TogglePlayerControllable(giveplayerid1);
                                
PlayerCuffed[giveplayerid] = 0;
                                
SetPlayerSpecialAction(giveplayeridSPECIAL_ACTION_NONE);
                                
RemovePlayerAttachedObject(playerid,0);
                                
GaveUp[giveplayerid] = 0;
                                
SetPlayerColor(giveplayerid0xFF990000);
                                
KillTimer(cufftimer[giveplayerid]);
                            }
                            else
                            {
                                
SendClientMessage(playeridCOLOR_GREY"* That player isn't Tied up !");
                                return 
1;
                            }
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_GREY"* That player is not near you !");
                            return 
1;
                        }
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"* That player is Offline !");
                    return 
1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"* You are not a Cop / FBI / National Guard !");
            }
        }
//not connected
        
return 1;
    } 
Reply
#2

I think all you need to do is giveplayerid instead of playerid
Quote:

RemovePlayerAttachedObject(giveplayerid, 0);

Reply
#3

ok ill try ty anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)