PDA

View Full Version : [HELP]How to make anims in my mode.


KfirRP
02/12/2009, 06:30 PM
How can i make /animlist, and /crack, /handsup, /fall and other anims? can somebody give me LINK to a topic with codes? and where to put the anims in my script. Thanks!

*ToM*
02/12/2009, 06:49 PM
How can i make /animlist, and /crack, /handsup, /fall and other anims? can somebody give me LINK to a topic with codes? and where to put the anims in my script. Thanks!


You have to make your own commands (yeah sure you can always copy/paste them but it's shit) You put your commands under OnPlayerCommandText callback, in a blank script there's an example of it you just have to fill in the command (like what does this command do etc)...

Here's some examples from my TClan server script :


if(strcmp(cmdtext, "/animlist", true)==0 || strcmp(cmdtext, "/anims", true) == 0)
{
SendClientMessage(playerid,COLOR_PURPLE, ".........:::: Animations Help ::::........");
SendClientMessage(playerid,COLOR_WHITE, "/handsup /drunk /gangwalk /wave /sit /sleep");
SendClientMessage(playerid,COLOR_WHITE, "/pedal /smoke /gsign /celebrate /fucku /bomb");
SendClientMessage(playerid,COLOR_WHITE, "/laugh /rap /rap1-5 /robman /angry /riot1-5");
SendClientMessage(playerid,COLOR_PURPLE, ".........:::: Animations Help ::::........");
return 1;
}


Animlist is a command made of SendClientMessage (it sends a player a message) In game it looks perfect :)

You can also make anims, make a similar command to the one below and just change the anim style (you can find animation styles at SAMP WIKI Anims section (http://wiki.sa-mp.com/wiki/Animations) )

Here's one example from one of my scripts as well :


if(strcmp(cmdtext, "/handsup", true) == 0) {
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HAN DSUP);
return 1;
}


Look at those commands and edit them to fit the command you want, like change the thing it does or change the anim style etc...

KfirRP
03/12/2009, 04:17 AM
Where to script the /handsup? and i dont sure i know how to make/crack command. So i'll search.

Jikesh
03/12/2009, 10:39 AM
Put them under public OnPlayerCommandText(playerid, cmdtext[])

Like..
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/handsup", true) == 0) {
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HAN DSUP);
return 1;
}
}

KfirRP
03/12/2009, 12:03 PM
Got error when try to do gsign, i made somethings about. Theres a big guide?

*ToM*
03/12/2009, 12:57 PM
Got error when try to do gsign, i made somethings about. Theres a big guide?


You got an error as you didn't code it in, I gave you an example of /help command...There are commands but they're only in my script, you have to code them in like /handsup thing...
Look at the example with /handsup command then just change the animation to somethin else...it'll work out

basse
22/09/2011, 07:23 PM
Do i have to forward anything like forward animation blabla

#define animation?

IceCube!
22/09/2011, 07:28 PM
OMFG THIS TOPIC IS FROM 2009! DON'T BUMP START A NEW THREAD

Also answer to your question no

BlackStones
22/09/2011, 08:02 PM
OMFG THIS TOPIC IS FROM 2009! DON'T BUMP START A NEW THREAD

Also answer to your question no

what 2009? we are into 2011 OMG

doreto
22/09/2011, 08:04 PM
what 2009? we are into 2011 OMG

he means this topic is from 2009