29.03.2013, 15:23
Hi i got a
problem i already posted it here but nothing helps
problem
i got a uncuff cmd
but when i go ig i can cuff someone but not UNCUFF
noting appears
problem i already posted it here but nothing helps
problem
i got a uncuff cmd
but when i go ig i can cuff someone but not UNCUFF
noting appears
Код:
CMD:uncuff(playerid, params[]) { if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5 || (PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pDivision] == 2)) { new string[128], giveplayerid; if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /uncuff [playerid]"); if(IsPlayerConnected(giveplayerid)) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(PlayerInfo[giveplayerid][pJailed] >= 1) { SendClientMessageEx(playerid, COLOR_WHITE, "You can't uncuff a jailed player."); return 1; } if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, "You can't uncuff yourself."); return 1; } if(PlayerCuffed[giveplayerid]>1) { if(IsPlayerAttachedObjectSlotUsed(giveplayerid)) RemovePlayerAttachedObject(giveplayerid); DeletePVar(giveplayerid, "IsFrozen"); format(string, sizeof(string), "* You have been uncuffed by %s.", GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* You uncuffed %s.", GetPlayerNameEx(giveplayerid)); SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has uncuffed %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(giveplayerid, "~g~Uncuffed", 2500, 3); TogglePlayerControllable(giveplayerid, 1); ClearAnimations(giveplayerid); PlayerCuffed[giveplayerid] = 0; PlayerCuffedTime[playerid] = 0; DeletePVar(giveplayerid, "PlayerCuffed"); } { SendClientMessageEx(playerid, COLOR_GREY, "That player isn't cuffed."); return 1; } } else { SendClientMessageEx(playerid, COLOR_GREY, "That player isn't near you."); return 1; } } else { SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified."); return 1; } } else { SendClientMessageEx(playerid, COLOR_GREY, "You're not a law enforcement officer."); } return 1; }