Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: [Akatsuki]Itachi on June 17, 2013, 10:09:06 am
-
I know how to set player drunk, but got some question.
SetPlayerDrunk( plr,100,100); <<<<<<<<<<< 100 is no drunk or 0 is.
And if I want all player drunk, can it be set to this ?
SetPlayerDrunk( all,100,100);
Thank You !
-
1. 100 is drunk.
2. If you want to put for all, try this code. I can't be sure if it will work because I haven't been scripting Pawn for a long time.
[pawn]new i = 0;
while( i < GetMaxPlayers() )
{
if( IsPlayerConnected( i ) )
{
SetPlayerDrunk( i, 100, 100 );
}
i++;
}[/pawn]
-
function
[pawn]
forward SetPlayerDrunkForAll(visuals, handling);
public SetPlayerDrunkForAll(visuals, handling)
{
for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if ( IsPlayerConnected(playerid) )
{
SetPlayerDrunk(playerid, visuals, handling);
}
}
}
[/pawn]
how use it
[pawn]SetPlayerDrunkForAll(100, 100);[/pawn]
and read it
http://wiki.amxmodx.org/index.php/Pawn_Tutorial
http://wiki.sa-mp.com/
http://thijn.vrocker-hosting.co.uk/VCWiki/index.php/Main_Page
-
Good Saint ::)
-
thx guys ! ;D