SA-MP Forums Archive
drinking with that one object? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: drinking with that one object? (/showthread.php?tid=110702)



drinking with that one object? - Mechscape - 28.11.2009



See where is white. How it?



Re: drinking with that one object? - [XST]O_x - 28.11.2009

pawn Код:
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);



Re: drinking with that one object? - Mechscape - 28.11.2009

I have /drink, if i type /drink and he do drink anim and stopping. Do this
"SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DR INK_BEER);" add's if drink anims and stopping, then object removed?

"/drink > Drink Anim + Object > Stopping drink anim and object removed" - Example

Sorry bad english.


Re: drinking with that one object? - [XST]O_x - 28.11.2009

Do you mean like..
The player will drink for like...7 seconds and then he will stop?
Or you want a command that will stop the animation?


Re: drinking with that one object? - Mechscape - 28.11.2009

Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Do you mean like..
The player will drink for like...7 seconds and then he will stop?
Or you want a command that will stop the animation?
... and the object will be removed. (If drink anim stopped)

Yes.


Re: drinking with that one object? - [XST]O_x - 28.11.2009

Then you have to use timers.
On the top:
pawn Код:
forward 7secondsbeer(playerid)
OnPlayerCommandText:
pawn Код:
if (strcmp("/drink", cmdtext, true, 9) == 0)
    {
        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
        SetTimer("7secondsbeer",7000,0);
        return 1;
    }
On the bottom:
pawn Код:
public 7secondsbeer(playerid)
{
   SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
}