Drunk Questions - 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)
+--- Thread: Drunk Questions (
/showthread.php?tid=387021)
Drunk Questions -
Majava - 22.10.2012
Well, i think im going to do something like this.
Now i have checkpoint on bar what opens dialog for you.
PHP код:
if(listitem == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_WINE);
SendClientMessage(playerid,COLOR_YELLOW,"You have bought Wine for $15");
GivePlayerMoney(playerid,-15);
}
PHP код:
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_WINE);
how i can make working like.
if(IsPlayerDrunkLevel > minium drunk level
{
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1,1);
}
else if(IsPlayerDrunkLevel < 1)
{
ClearAnimations(playerid);
}
SPECIAL_ACTION_DRINK_WINE give you wine bottle.
Can i change drunk level what wine bottle gave for me?
I want this script applying drunk walk when player is drunk and disabling when not.
Re: Drunk Questions -
ThePhenix - 22.10.2012
What you want to do is that when the player takes the wine, walk like drunk and when passing a specific time return to normal?
SetTimer might work, I think.
Re: Drunk Questions -
Hiddos - 22.10.2012
Well you could immediately set the drunk level to zero after him drinking, and then setting it to the value you desire?
Re: Drunk Questions -
Majava - 22.10.2012
Quote:
Originally Posted by ThePhenix
What you want to do is that when the player takes the wine, walk like drunk and when passing a specific time return to normal?
SetTimer might work, I think.
|
When player drinks wine he gots drunk lvl 2000, drunk animation and 3mins/180000ms is good time to set player normal. after 3mins when player gets normal clear players anim and set players drunk lvl 0. Sorry i am beginner help me.
Re: Drunk Questions -
Majava - 26.10.2012
Bump