Is there any way to do an animation and to configure it to be activated with a key
yes in this example its handsup anim on player press key "D"
function onScriptLoad()
{
handsup <- BindKey(true,0x44,0,0)
}
function onKeyDown( player, key )
{
if ( key == handsup )
{
if (player.Vehicle ) MessagePlayer( COLOR_RED+"Error:[#FCF805]You must be on foot!.", player );
else
{
player.SetAnim(0,161);
}
}
Good tip: check if player laying on ground to prevent shotgun-push "evade".
} else if(("dance" == cmd)||("damce" == cmd)){
if((42 == player.Action)||(43 == player.Action)){
MessagePlayer("[#cccccc]* You can't dance laying on ground.", player);
} else {
if("1" == text){
player.SetAnim(28,226);
} else if("2" == text){
player.SetAnim(28,227);
} else if("3" == text){
player.SetAnim(28,228);
} else if("4" == text){
player.SetAnim(28,229);
} else if("5" == text){
player.SetAnim(28,230);
} else if("6" == text){
player.SetAnim(28,231);
} else if("7" == text){
player.SetAnim(28,232);
} else {
player.SetAnim(28,226);
}
}
}
@vito @Eva :D Ggg thanks but I did not refer this way I say is that if you can configure it from a .ifp animation file but I think that's not possible
You can use .ifp animation as weapon (I use this in my server for sex) or as vehicle only.
Quote from: vito on Mar 25, 2017, 07:16 AMYou can use .ifp animation as weapon (I use this in my server for sex) or as vehicle only.
8) :o :D server name
But i don't have a partner :( >:(
Quote from: zeus on Mar 25, 2017, 05:28 PM8) :o :D server name
But i don't have a partner :( >:(
https://forum.vc-mp.org/?topic=4383.0
else if ( cmd == "dance" || cmd == "damce" )
if (42 == player.Action || 43 == player.Action)
{
MessagePlayer("[#cccccc]* You can't dance laying on ground.", player);
} else {
if("1" == text){
player.SetAnim(28,226);
} else if("2" == text){
player.SetAnim(28,227);
} else if("3" == text){
player.SetAnim(28,228);
} else if("4" == text){
player.SetAnim(28,229);
} else if("5" == text){
player.SetAnim(28,230);
} else if("6" == text){
player.SetAnim(28,231);
} else if("7" == text){
player.SetAnim(28,232);
} else {
player.SetAnim(28,226);
}
}
}
Instead of :
Quote from: vito on Mar 24, 2017, 07:56 AMGood tip: check if player laying on ground to prevent shotgun-push "evade".
} else if(("dance" == cmd)||("damce" == cmd)){
if((42 == player.Action)||(43 == player.Action)){
MessagePlayer("[#cccccc]* You can't dance laying on ground.", player);
} else {
if("1" == text){
player.SetAnim(28,226);
} else if("2" == text){
player.SetAnim(28,227);
} else if("3" == text){
player.SetAnim(28,228);
} else if("4" == text){
player.SetAnim(28,229);
} else if("5" == text){
player.SetAnim(28,230);
} else if("6" == text){
player.SetAnim(28,231);
} else if("7" == text){
player.SetAnim(28,232);
} else {
player.SetAnim(28,226);
}
}
}