SA-MP Forums Archive
2 Errors on Cuff animation!!! +Rep for the one who Fix it! - 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: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! (/showthread.php?tid=392279)



2 Errors on Cuff animation!!! +Rep for the one who Fix it! - goviscrap - 13.11.2012

When I complies im getting this errors:
Код:
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(42988) : error 029: invalid expression, assumed zero
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(42988) : error 035: argument type mismatch (argument 2)
On this line:
Код:
SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_CUFFED);
What's Wrong?
Tell me if you want me to Paste any more Lines.

+Rep to the one who fixes it!


Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - -=Dar[K]Lord=- - 13.11.2012

make sure that u have defined giveplayerid ...


Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - goviscrap - 13.11.2012

Lol it worked if i changed it to "playerid" :S

Thanks for the Reply anyways! +rep for you


Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - -=Dar[K]Lord=- - 13.11.2012

lol its k i just wanted to make sure that it was giveplayerid or playerid ...


Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - tyler12 - 13.11.2012

Can I see the whole command?


Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - -=Dar[K]Lord=- - 13.11.2012

Quote:
Originally Posted by tyler12
Посмотреть сообщение
Can I see the whole command?
man cant u see that the prob is solved =.="


Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - tyler12 - 13.11.2012

Quote:
Originally Posted by -=Dar[K]Lord=-
Посмотреть сообщение
man cant u see that the prob is solved =.="
Quote:
Originally Posted by goviscrap
Посмотреть сообщение
Lol it worked if i changed it to "playerid" :S

Thanks for the Reply anyways! +rep for you
Sir, he said it works if he changes 'giveplayerid' to 'playerid'. I wouldn't of replied if it was solved.


Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - goviscrap - 13.11.2012

hehe.. One thing only worked.... :/ error 035: argument type mismatch (argument 2) is still there and fuck things up! :/
here is the whole Code of it:

Код:
}
	else
	{
	format(string, sizeof(string), "* You Cuffed %s.", giveplayer);
	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer);
	ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	}
	GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3);
	//test Cuffed animation
	SetPlayerSpecialAction(giveplayerid, == SPECIAL_ACTION_CUFFED);
	SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);//this will set the object cuffs at the hand of the player you want to cuff.
	//Test cuffed animation End
	//TogglePlayerControllable(giveplayerid, 0); //annars ta tillbaka om ej funkar
	//ClearAnimations(giveplayerid); //annars ta tillbaka om ej funkar
	//ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0); //annars ta tillbaka om ej funkar
	/ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0); //annars ta tillbaka om ej funkar
	PlayerCuffed[giveplayerid] = 2;
	PlayerCuffedTime[giveplayerid] = 300;
	}
	else
	{



Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - -=Dar[K]Lord=- - 16.11.2012

Show Us The Whole Code

@tyler12 Srry Lol I dont wanna be rude... just telling u


Re: 2 Errors on Cuff animation!!! +Rep for the one who Fix it! - -=Dar[K]Lord=- - 20.11.2012

pawn Код:
}
    else
    {
    format(string, sizeof(string), "* You Cuffed %s.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3);
    //test Cuffed animation
    SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_CUFFED);
    SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);//this will set the object cuffs at the hand of the player you want to cuff.
    //Test cuffed animation End
    //TogglePlayerControllable(giveplayerid, 0); //annars ta tillbaka om ej funkar
    //ClearAnimations(giveplayerid); //annars ta tillbaka om ej funkar
    //ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0); //annars ta tillbaka om ej funkar
    //ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0); //annars ta tillbaka om ej funkar
    PlayerCuffed[giveplayerid] = 2;
    PlayerCuffedTime[giveplayerid] = 300;
    }
    else
    {
Take...