SA-MP Forums Archive
Help ACTION BUG!!! ( no ones help ?) - 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: Help ACTION BUG!!! ( no ones help ?) (/showthread.php?tid=533748)



Help ACTION BUG!!! ( no ones help ?) - FloxX - 26.08.2014

How to If Me Drink Sprunk My Drunk Level Has Set 0 (Zero)

I put this
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
{
SetPlayerDrunkLevel(playerid, 0);
SendClientMessage(playerid, COLOR_RED, "Now your body is recover and you not feel drunk!");
return 1;
}

If I Drink Sprunk , No Effect For that code o.O Why?? And i Still Drunk

Please Help Me


Re: Help ACTION BUG!!! ( no ones help ?) - Dotayuri - 26.08.2014

Returns 0 on failure,
also the max is 50,000

1,999 and down is sober,

over 2,000 will make the player drunk (camera swaying and vehicles difficult to control).

over 5,000 will make the player drunk (camera swaying and vehicles difficult to control)
, will also there hide radar.

https://sampwiki.blast.hk/wiki/SetPlayerDrunkLevel


Re: Help ACTION BUG!!! ( no ones help ?) - JeevanJyothish - 26.08.2014

Like this ?
pawn Код:
if (strcmp(cmdtext, "/drunk", true) == 0)
{
    SetPlayerDrunkLevel (playerid, 4000);
    SendClientMessage(playerid, 0xFFFFFFAA, "You are now drunk; don't drink and drive!");
    return 1;
}
?

Edit the SetPlayerDrunkLevel (playerid, 4000); 4000 to 1000 for level 1 to 4 .


Re: Help ACTION BUG!!! ( no ones help ?) - Dotayuri - 26.08.2014

Quote:
Originally Posted by Dotayuri
Посмотреть сообщение
Returns 0 on failure,
also the max is 50,000

1,999 and down is sober,

over 2,000 will make the player drunk (camera swaying and vehicles difficult to control).

over 5,000 will make the player drunk (camera swaying and vehicles difficult to control)
, will also there hide radar.

https://sampwiki.blast.hk/wiki/SetPlayerDrunkLevel
Also keep this in mind. Its on the link...
"Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!)."


Re: Help ACTION BUG!!! ( no ones help ?) - Dotayuri - 26.08.2014

In your commands put

CMD:buydrink(){
//check if player is near a sprunk vending machine "1.0" or closer.
// then set drunk level to 10
}

Or

Use this under OnPlayerKeyStateChange() {

if(newkeys & KEY_ACTION)
{
//check if they use the key "KEY_ACTION"
// then check if there near sprunk machine
// then set drunk level to 10
}
}

Sorry this is the best I can do as I using a phone