SA-MP Forums Archive
0.3e cuff help? - 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)
+--- Thread: 0.3e cuff help? (/showthread.php?tid=341353)



0.3e cuff help? - TheDiscussionCafe - 10.05.2012

okay i need cuff help. here is my 0.3d cuff cmd:

pawn Код:
command(cuff, playerid, params[])
{
    new ID; new pname[24]; new opname[24]; new string[200];

    if(GetPVarInt(playerid, "Spawned") == 0) return SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command.");
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in a vehicle.");
    if(sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR_ERROR, "USAGE: /cuff (ID)");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_ERROR, "Invalid ID.");
    GetPlayerName(ID, opname, 24); GetPlayerName(playerid, pname, 24);
    if(GetDistanceBetweenPlayers(playerid, ID) > 3) return SendClientMessage(playerid, COLOR_ERROR, "That player is too far away to hand cuff.");
    if(GetPVarInt(ID, "Cuffed") == 1) return SendClientMessage(playerid, COLOR_ERROR, "That player is already cuffed.");
    if(GetPVarInt(ID, "Jailed") == 1) return SendClientMessage(playerid, COLOR_ERROR, "You cannot cuff a prisoner.");
    if(IsPlayerInAnyVehicle(ID)) return SendClientMessage(playerid, COLOR_ERROR, "That player is in a vehicle. You cannot cuff him.");
    if(gTeam[ID] == Team_Cop || gTeam[ID] == Team_Army || gTeam[ID] == Team_FBI) return SendClientMessage(playerid, COLOR_ERROR, "You cannot cuff other Police Officers.");
    TogglePlayerControllable(ID, 0);
    GameTextForPlayer(ID, "~b~HANDCUFFED!", 5000, 1);
    format(string, sizeof(string), "[POLICE] Officer %s (%d) has put hand cuffs on you. You cannot move.", pname, playerid);
    SendClientMessage(ID, COLOR_DODGERBLUE, string);
    format(string, 200, "[DISPATCH] Officer %s (%d) has cuffed player %s (%d)", pname, playerid, opname, ID);
    SendCopMessage(string);
    SetPVarInt(ID, "Cuffed", 1);
    SetPVarInt(ID, "CuffTimer", 15);
    SendClientMessage(playerid, COLOR_DODGERBLUE, "[POLICE] You have cuffed a suspect. You have 100 seconds before they are let loose.");
    return 1;
}
how i make the 0.3e cuff animation and effectt?


Re: 0.3e cuff help? - Laronic - 10.05.2012

pawn Код:
SetPlayerSpecialAction(ID, SPECIAL_ACTION_CUFFED);



Re: 0.3e cuff help? - TheDiscussionCafe - 10.05.2012

Quote:
Originally Posted by CyberGhost
Посмотреть сообщение
pawn Код:
SetPlayerSpecialAction(ID, SPECIAL_ACTION_CUFFED);
i kno thx and what i change in my cuff command? and where i change?


Re: 0.3e cuff help? - john_jenkins - 10.05.2012

man i can help you but reaptuian me first


Re: 0.3e cuff help? - dannyk0ed - 10.05.2012

Make sure in /uncuff you set it that
pawn Код:
ClearAnimations(giveplayerid);



Re: 0.3e cuff help? - ViruZz - 10.05.2012

pawn Код:
command(cuff, playerid, params[])
{
    new ID; new pname[24]; new opname[24]; new string[200];

    if(GetPVarInt(playerid, "Spawned") == 0) return SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command.");
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in a vehicle.");
    if(sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR_ERROR, "USAGE: /cuff (ID)");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_ERROR, "Invalid ID.");
    GetPlayerName(ID, opname, 24); GetPlayerName(playerid, pname, 24);
    if(GetDistanceBetweenPlayers(playerid, ID) > 3) return SendClientMessage(playerid, COLOR_ERROR, "That player is too far away to hand cuff.");
    if(GetPVarInt(ID, "Cuffed") == 1) return SendClientMessage(playerid, COLOR_ERROR, "That player is already cuffed.");
    if(GetPVarInt(ID, "Jailed") == 1) return SendClientMessage(playerid, COLOR_ERROR, "You cannot cuff a prisoner.");
    if(IsPlayerInAnyVehicle(ID)) return SendClientMessage(playerid, COLOR_ERROR, "That player is in a vehicle. You cannot cuff him.");
    if(gTeam[ID] == Team_Cop || gTeam[ID] == Team_Army || gTeam[ID] == Team_FBI) return SendClientMessage(playerid, COLOR_ERROR, "You cannot cuff other Police Officers.");
    TogglePlayerControllable(ID, 0);
    SetPlayerSpecialAction(ID, SPECIAL_ACTION_CUFFED);
    GameTextForPlayer(ID, "~b~HANDCUFFED!", 5000, 1);
    format(string, sizeof(string), "[POLICE] Officer %s (%d) has put hand cuffs on you. You cannot move.", pname, playerid);
    SendClientMessage(ID, COLOR_DODGERBLUE, string);
    format(string, 200, "[DISPATCH] Officer %s (%d) has cuffed player %s (%d)", pname, playerid, opname, ID);
    SendCopMessage(string);
    SetPVarInt(ID, "Cuffed", 1);
    SetPVarInt(ID, "CuffTimer", 15);
    SendClientMessage(playerid, COLOR_DODGERBLUE, "[POLICE] You have cuffed a suspect. You have 100 seconds before they are let loose.");
    return 1;
}