Cuff animation not displayed
#1

What am I doing wrong ?

Код:
CMD:cuff(playerid, params[]){
	
	new targetid, pName2[MAX_PLAYER_NAME], pName3[MAX_PLAYER_NAME], string[128];
	
	if (sscanf(params, "u", targetid))
		return SendClientMessage(playerid, COLOR_SYNTAX, "Syntax: /cuff [playerid]");
	
	if(!IsPlayerConnected(targetid))
		return SendClientMessage(playerid, RED, "Invalid Player ID!");
	
	
	SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED);GameTextForPlayer(targetid, "You are cuffed", 3000, 3);
	
	GetPlayerName(playerid, pName2, sizeof(pName2));
	GetPlayerName(targetid, pName3, sizeof(pName3));
	
	format(string, sizeof(string), "%s has cuffed %s ", pName2, pName3);
	NearbyMessage(playerid, LIGHTBLUE, string);
	return 1;
}
Reply
#2

Try this..

pawn Код:
CMD:cuff(playerid, params[]){

    new targetid, pName2[MAX_PLAYER_NAME], pName3[MAX_PLAYER_NAME], string[128];

    if (sscanf(params, "u", targetid))
        return SendClientMessage(playerid, COLOR_SYNTAX, "Syntax: /cuff [playerid]");

    if(!IsPlayerConnected(targetid))
        return SendClientMessage(playerid, RED, "Invalid Player ID!");



    SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
    SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
    GameTextForPlayer(targetid,"You have been cuffed",3000,5);
       
    GetPlayerName(playerid, pName2, sizeof(pName2));
    GetPlayerName(targetid, pName3, sizeof(pName3));

    format(string, sizeof(string), "%s has cuffed %s ", pName2, pName3);
    NearbyMessage(playerid, LIGHTBLUE, string);
    return 1;
}
Reply
#3

Nope, no effect .. His hands won't go behind his back..
Reply
#4

Hmm.. I don't other ways... sorry

edit: did you try it by yourself?
Reply
#5

Try this.

PHP код:
CMD:cuff(playeridparams[]){
    
    new 
otherPlayerpName2[MAX_PLAYER_NAME], pName3[MAX_PLAYER_NAME], string[128];
    
    if (
sscanf(params"u"otherPlayer))
        return 
SendClientMessage(playeridCOLOR_SYNTAX"Syntax: /cuff [playerid]");
    
    if(!
IsPlayerConnected(targetid))
        return 
SendClientMessage(playeridRED"Invalid Player ID!");
    
    
    
SetPlayerSpecialAction(otherPlayerSPECIAL_ACTION_CUFFED);
        
GameTextForPlayer(targetid"You are cuffed"30003);
    
    
GetPlayerName(playeridpName2sizeof(pName2));
    
GetPlayerName(otherPlayerpName3sizeof(pName3));
    
    
format(stringsizeof(string), "%s has cuffed %s "pName2pName3);
    
NearbyMessage(playeridLIGHTBLUEstring);
    return 
1;

Reply
#6

What skin are you using? It doesn't work on CJ.

Also if you want the cuffs object attached, see this: https://sampforum.blast.hk/showthread.php?tid=349759
Reply
#7

Quote:
Originally Posted by MP2
Посмотреть сообщение
What skin are you using? It doesn't work on CJ.

Also if you want the cuffs object attached, see this: https://sampforum.blast.hk/showthread.php?tid=349759
+rep man! Thanks a lot !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)