Player animation.
#1

Does anyone know of an animation that does or could resemble the boot of a vehicle being opened/closed?
Reply
#2

Код:
new Text:txtAnimHelper;

txtAnimHelper = TextDrawCreate(610.0, 400.0,"~r~/stopanim ~w~to stop the animation");
	TextDrawUseBox(txtAnimHelper, 0);
	TextDrawFont(txtAnimHelper, 2);
	TextDrawSetShadow(txtAnimHelper,0); // no shadow
    TextDrawSetOutline(txtAnimHelper,1); // thickness 1
    TextDrawBackgroundColor(txtAnimHelper,0x000000FF);
    TextDrawColor(txtAnimHelper,0xFFFFFFFF);
    TextDrawAlignment(txtAnimHelper,3);

if(strcmp("/animlist",cmdtext,true) == 0)
	{
	SendClientMessage(playerid,COLOR_ORANGE,"___________________________________");
	SendClientMessage(playerid,COLOR_ORANGE,"|Loading Animlist....");
	SendClientMessage(playerid,COLOR_ORANGE,"|    /lay      /wave   /crack     /sit           /slapass");
	SendClientMessage(playerid,COLOR_ORANGE,"|    /hide    /deal    /smoke   /robman   /eat");
	SendClientMessage(playerid,COLOR_ORANGE,"|    /laugh  /chat    /fucku     /taichi      /vomit");
	SendClientMessage(playerid,COLOR_ORANGE,"|    /dance 1-4      /chairsit  /drunk");
	return 1;
}
	if(strcmp("/stopanim",cmdtext,true) == 0)
	{
	ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
	TextDrawHideForPlayer(playerid,txtAnimHelper);
	return 1;
}
	if(strcmp(cmdtext, "/drunk",true) == 0)
	{
	ApplyAnimation(playerid,"PED","WALK_drunk",4.1,0,1,1,1,1); //drunk
	TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if(strcmp(cmdtext, "/chairsit", true) == 0)
	{
	ApplyAnimation(playerid,"BAR","dnk_stndF_loop",4.0,1,0,0,0,0);
	TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
	if(strcmp("/laugh",cmdtext,true) == 0)
	{
	ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
	return 1;
}
    if (strcmp("/robman", cmdtext, true) == 0)
	{
	ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
	TextDrawShowForPlayer(playerid,txtAnimHelper);
 	return 1;
}
    if (strcmp("/lay", cmdtext, true, 6) == 0)
	{
    ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
    TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
	if (strcmp("/wave", cmdtext, true) == 0)
	{
	ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Wave
	TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if (strcmp("/crack", cmdtext, true, 6) == 0)
	{
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
    TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if (strcmp("/sit", cmdtext, true, 4) == 0)
	{
	ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0); // Sit
	TextDrawShowForPlayer(playerid,txtAnimHelper);
 	return 1;
}
    if (strcmp("/smoke", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); // Female Smoking
    TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if(strcmp(cmdtext, "/chat", true) == 0)
	{
	ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0); //chat
   	return 1;
}
    if(strcmp(cmdtext, "/dance 1", true) == 0)
	{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);// dance 1
	return 1;
}
    if(strcmp(cmdtext, "/dance 2", true) == 0)
	{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);// dance 2
	return 1;
}
	if(strcmp(cmdtext, "/dance 3", true) == 0)
	{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);// dance 3
	return 1;
}
	if(strcmp(cmdtext, "/dance 4", true) == 0)
	{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);// dance 4
	return 1;
}
    if(strcmp(cmdtext, "/fucku", true) == 0)
	{
	ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0); // fucku
 	return 1;
}
    if(strcmp(cmdtext, "/taichi", true) == 0)
	{
	ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0); // taichi
	TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if (strcmp("/slapass", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); // Ass Slapping
	return 1;
}
    if (strcmp("/deal", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal
	return 1;
}
    if (strcmp("/eat", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
	return 1;
}
    if (strcmp("/hide", cmdtext, true, 3) == 0)
	{
    ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
    TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
	// Vomit
    if (strcmp("/vomit", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); // Vomit BAH!
 	return 1;
}
Reply
#3

Quote:
Originally Posted by ]B4E[kengston
Посмотреть сообщение
Код:
new Text:txtAnimHelper;

txtAnimHelper = TextDrawCreate(610.0, 400.0,"~r~/stopanim ~w~to stop the animation");
	TextDrawUseBox(txtAnimHelper, 0);
	TextDrawFont(txtAnimHelper, 2);
	TextDrawSetShadow(txtAnimHelper,0); // no shadow
    TextDrawSetOutline(txtAnimHelper,1); // thickness 1
    TextDrawBackgroundColor(txtAnimHelper,0x000000FF);
    TextDrawColor(txtAnimHelper,0xFFFFFFFF);
    TextDrawAlignment(txtAnimHelper,3);

if(strcmp("/animlist",cmdtext,true) == 0)
	{
	SendClientMessage(playerid,COLOR_ORANGE,"___________________________________");
	SendClientMessage(playerid,COLOR_ORANGE,"|Loading Animlist....");
	SendClientMessage(playerid,COLOR_ORANGE,"|    /lay      /wave   /crack     /sit           /slapass");
	SendClientMessage(playerid,COLOR_ORANGE,"|    /hide    /deal    /smoke   /robman   /eat");
	SendClientMessage(playerid,COLOR_ORANGE,"|    /laugh  /chat    /fucku     /taichi      /vomit");
	SendClientMessage(playerid,COLOR_ORANGE,"|    /dance 1-4      /chairsit  /drunk");
	return 1;
}
	if(strcmp("/stopanim",cmdtext,true) == 0)
	{
	ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
	TextDrawHideForPlayer(playerid,txtAnimHelper);
	return 1;
}
	if(strcmp(cmdtext, "/drunk",true) == 0)
	{
	ApplyAnimation(playerid,"PED","WALK_drunk",4.1,0,1,1,1,1); //drunk
	TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if(strcmp(cmdtext, "/chairsit", true) == 0)
	{
	ApplyAnimation(playerid,"BAR","dnk_stndF_loop",4.0,1,0,0,0,0);
	TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
	if(strcmp("/laugh",cmdtext,true) == 0)
	{
	ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
	return 1;
}
    if (strcmp("/robman", cmdtext, true) == 0)
	{
	ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
	TextDrawShowForPlayer(playerid,txtAnimHelper);
 	return 1;
}
    if (strcmp("/lay", cmdtext, true, 6) == 0)
	{
    ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
    TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
	if (strcmp("/wave", cmdtext, true) == 0)
	{
	ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Wave
	TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if (strcmp("/crack", cmdtext, true, 6) == 0)
	{
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
    TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if (strcmp("/sit", cmdtext, true, 4) == 0)
	{
	ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0); // Sit
	TextDrawShowForPlayer(playerid,txtAnimHelper);
 	return 1;
}
    if (strcmp("/smoke", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); // Female Smoking
    TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if(strcmp(cmdtext, "/chat", true) == 0)
	{
	ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0); //chat
   	return 1;
}
    if(strcmp(cmdtext, "/dance 1", true) == 0)
	{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);// dance 1
	return 1;
}
    if(strcmp(cmdtext, "/dance 2", true) == 0)
	{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);// dance 2
	return 1;
}
	if(strcmp(cmdtext, "/dance 3", true) == 0)
	{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);// dance 3
	return 1;
}
	if(strcmp(cmdtext, "/dance 4", true) == 0)
	{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);// dance 4
	return 1;
}
    if(strcmp(cmdtext, "/fucku", true) == 0)
	{
	ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0); // fucku
 	return 1;
}
    if(strcmp(cmdtext, "/taichi", true) == 0)
	{
	ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0); // taichi
	TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
    if (strcmp("/slapass", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); // Ass Slapping
	return 1;
}
    if (strcmp("/deal", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal
	return 1;
}
    if (strcmp("/eat", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
	return 1;
}
    if (strcmp("/hide", cmdtext, true, 3) == 0)
	{
    ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
    TextDrawShowForPlayer(playerid,txtAnimHelper);
	return 1;
}
	// Vomit
    if (strcmp("/vomit", cmdtext, true) == 0)
	{
    ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); // Vomit BAH!
 	return 1;
}
You just copied that animations from Raven's or what script,idk.


You need to make a command like /openboot,heres my tutorial.

https://sampforum.blast.hk/showthread.php?tid=196330


But after /openboot put something that looks like opening a vehicle.Example(Chat):

pawn Код:
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
Edit:And set a timer to stop the animation like:

pawn Код:
//AT THE TOP
new bottimer;
forward stopanim(playerid);


if(strcmp(cmd, "/openboot",true) == 0) {
        new vid = GetPlayerVehicleID(playerid);
        if(vid != INVALID_VEHICLE_ID) {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
            ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
            boottimer = SetTimer("stopanim",2000,1);
        }
        return 1;
    }

public stopanim(playerid)
{
     ClearPlayerAnimations(playerid);//IDK if this is correct,i forgot it xD
     KillTimer(boottimer);
     return 1;
}
Reply
#4

Perfect thank you for your help.
Reply
#5

Ok Guys Cool But How Can i Stop the Animation and Music when spawned ?
Reply
#6

Quote:
Originally Posted by nateykurgan
Посмотреть сообщение
Ok Guys Cool But How Can i Stop the Animation and Music when spawned ?
Ask that question from the topic that you downloaded the gamemode from.
Reply
#7

to stop the music you would nee to put this under OnPlayerSpawn()

PlayPlayerSound(playerid,1069,418.1829,2533.8340,1 6.563);

This will stop all sounds and make it the original game osunds,

home this helped you.
Reply
#8

PlayPlayerSound(playerid, 1069, 418.1829, 2533.8340, 16.5637);

Woops, sorry, added extra spaces and forgot a number, put this in there, and it should do the trick.

xD


--------------------------------------------------------------------


Ultimate Gangwar Deathmatch [Under Construction]

IP: 98.222.131.70:7777

Status: NEED HELP + Under construction

Being scripted from scratch
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)