#1

how can i make a command
thats like /anim [ name of the anim ]
like that how can i make that ?
Reply
#2

is it like this ?

pawn Код:
if(strcmp(cmd, "/anim", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new anim = strval(tmp);
        if (anim == handsup)
        {
        // here the anim line
        }
        return 1;
    }
Reply
#3

Erm the most simple and noobish way for you'd be this :

You have to put this under OnPlayerCommandText

Код:
  	if(strcmp(cmdtext, "/anim", true) == 0)
	{
	  SendClientMessage(playerid,COLOR_YELLOW,"/lay - /sit - /roll - /deal");
      SendClientMessage(playerid,COLOR_YELLOW,"/eat - /vomit - /dance1-4l");
      SendClientMessage(playerid,COLOR_YELLOW,"copy this as much as you want..");
		return 1;
 	}
Reply
#4

You posted right before me.

You want that when you type /anim you get a list of all possible anims or
when you type /anim you do something ?

Cause you explain badly..
Reply
#5

Quote:
Originally Posted by XtremeChio
You posted right before me.

You want that when you type /anim you get a list of all possible anims or
when you type /anim you do something ?

Cause you explain badly..
i mean
i got now anim commands
that are /handsup and /bomb like that
but i want it in 1 cmd /anim [animname ]
like /anim handsup
then he do the anim handsup
if i type /anim bomb
he do the bomb admin
Reply
#6

Checkout the "vactions" filterscript that comes with the server.
Reply
#7


I made these two for you. Put them under OnPlayerCommandText

Код:
	if(!strcmp(cmdtext,"/anim handsup", true))
	{

      ApplyAnimation(playerid, "ROB_BANK", "SHP_HandsUp_Scr", 4.0, 0, 0, 0, 0, 0);
      return 1;
	}
Код:
	if(!strcmp(cmdtext,"/anim bomb", true))
	{

      ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0, 1, 0, 0, 1, 0);
      return 1;
	}
You might get a warning for indetation cause I typed this in this chat and not in pawno
But to get a list of all animations, go here https://sampwiki.blast.hk/wiki/Animations
Reply
#8

ARE YOU STUPED
i said i wanted the anims in 1 cmd not in 200
but i already maked it so fixed
Reply
#9

Quote:
Originally Posted by radi
ARE YOU STUPED
i said i wanted the anims in 1 cmd not in 200
but i already maked it so fixed
Be happy that he helped you, because I doubt you'll get any more help with that kind of attitude.
Reply
#10

Quote:
Originally Posted by radi
ARE YOU STUPED
i said i wanted the anims in 1 cmd not in 200
but i already maked it so fixed
What the fuck ?

Yes, it seems I am stupid, since I helped someone like you..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)