SA-MP Forums Archive
how to make a player stone when smoking? - 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: how to make a player stone when smoking? (/showthread.php?tid=456918)



how to make a player stone when smoking? - eblood1 - 08.08.2013

dcmd_cig(playerid,params[])
{
#pragma unused params
if(GetPlayerSpecialAction(playerid) != 21)
SetPlayerSpecialAction(playerid,21);
else
SetPlayerSpecialAction(playerid, 0);
return 1;
}


Re: how to make a player stone when smoking? - hossa - 08.08.2013

you mean drunk vision ??
SetPlayerDrunkLevel


Re: how to make a player stone when smoking? - eblood1 - 08.08.2013

Quote:
Originally Posted by hossa
Посмотреть сообщение
you mean drunk vision ??
SetPlayerDrunkLevel
Noo, all you see is the trees moving and the weather turns like purple


Re: how to make a player stone when smoking? - hossa - 08.08.2013

Код:
i'm not a pro scripter but you need to use OnPlayerUpdate to check if player is drunk and set his weather to the " Purple " weather you want. and set it to normal if he isn't drunk.

and btw
Quote:
Originally Posted by eblood1
Посмотреть сообщение
all you see is the trees moving
where did you see that ? lol


Re: how to make a player stone when smoking? - BullseyeHawk - 08.08.2013

pawn Код:
dcmd_cig(playerid,params[])
{
    #pragma unused params
    if(GetPlayerSpecialAction(playerid) != 21)
    {
        SetPlayerSpecialAction(playerid,21);
        SetPlayerWeather(playerid, -66); // <== Stone weather
    }
    else
    {
        SetPlayerSpecialAction(playerid, 0);
        SetPlayerWeather(playerid, 3); // <== Normal weather
    }
    return 1;
}
I script blind without using pawno or testing in-game, so check it the weather id is -66 or -68 please.
Everything else should work.


Re: how to make a player stone when smoking? - eblood1 - 08.08.2013

Quote:
Originally Posted by hossa
Посмотреть сообщение
Код:
i'm not a pro scripter but you need to use OnPlayerUpdate to check if player is drunk and set his weather to the " Purple " weather you want. and set it to normal if he isn't drunk.

and btw


where did you see that ? lol
this. [ame]http://www.youtube.com/watch?v=RdIU9FkYSJk[/ame]
is not really a mod i seen it in some server


Re: how to make a player stone when smoking? - hossa - 08.08.2013

Quote:
Originally Posted by BullseyeHawk
Посмотреть сообщение
pawn Код:
dcmd_cig(playerid,params[])
{
    #pragma unused params
    if(GetPlayerSpecialAction(playerid) != 21)
    {
        SetPlayerSpecialAction(playerid,21);
        SetPlayerWeather(playerid, -66); // <== Stone weather
    }
    else
    {
        SetPlayerSpecialAction(playerid, 0);
        SetPlayerWeather(playerid, 3); // <== Normal weather
    }
    return 1;
}
I script blind without using pawno or testing in-game, so check it the weather id is -66 or -68 please.
Everything else should work.
Quote:
Originally Posted by eblood1
Посмотреть сообщение
this. http://www.youtube.com/watch?v=RdIU9FkYSJk
is not really a mod i seen it in some server
here is the script you want, I was just Lol'ng at the moving trees ^_^
@BullseyeHawk, i think it should work if weather is right


Re: how to make a player stone when smoking? - NinjahZ - 08.08.2013

I have also seen this in a server ^_^ I been looking for it for a long time :L


Re: how to make a player stone when smoking? - eblood1 - 08.08.2013

Thanks <3 BullseyeHawk and hossa