Vice City: Multiplayer

Off-Topic => Off-Topic General => Topic started by: Luis_Labarca on Mar 24, 2017, 04:33 AM

Title: Doubt animation
Post by: Luis_Labarca on Mar 24, 2017, 04:33 AM
Is there any way to do an animation and to configure it to be activated with a key
Title: Re: Doubt animation
Post by: Eva on Mar 24, 2017, 07:23 AM
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);
}
}




Title: Re: Doubt animation
Post by: vito on Mar 24, 2017, 07:56 AM
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);
}
}
}
Title: Re: Doubt animation
Post by: Luis_Labarca on Mar 25, 2017, 03:03 AM
@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
Title: Re: Doubt animation
Post by: vito on Mar 25, 2017, 07:16 AM
You can use .ifp animation as weapon (I use this in my server for sex) or as vehicle only.
Title: Re: Doubt animation
Post by: ! on Mar 25, 2017, 05:28 PM
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 :( >:(
Title: Re: Doubt animation
Post by: vito on Mar 25, 2017, 05:32 PM
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
Title: Re: Doubt animation
Post by: luchgox on Apr 05, 2017, 01:43 AM

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);
}
}
}