SA-MP Forums Archive
/uncuff - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /uncuff (/showthread.php?tid=76969)



/uncuff - johnnie_knoxville - 08.05.2009

if(strcmp(cmd, "/uncuff", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /uncuff [Playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Uncuff yourself!"); return 1; }
if(PlayerCuffed[giveplayerid])
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You were Uncuffed by %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You Uncuffed %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GameTextForPlayer(giveplayerid, "~g~Uncuffed", 2500, 3);
TogglePlayerControllable(giveplayerid, 1);
PlayerCuffed[giveplayerid] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player isn't Tied up !");
return 1;





I have this and i'm the leader of the Police or FBI i can't uncuff i have to do Unfreeze (player ID) and then when he entres a building he gets automatically uncuffed so can you please help what i did wrong with code?


Re: /uncuff - MenaceX^ - 08.05.2009

Go to GF topic, try reading forum rules before posting.


Re: /uncuff - Rks25 - 08.05.2009

does it compile correct. you got lackage of brackets.


Re: /uncuff - johnnie_knoxville - 08.05.2009

RKS it compiles OK but can you help me



Re: /uncuff - MenaceX^ - 08.05.2009

I've already said, you should go to GF topic, if you won't be following the rules you'll be banned.