Author Topic: Help Me !  (Read 2767 times)

0 Members and 1 Guest are viewing this topic.

Offline [Akatsuki]Itachi

  • Wiseguy
  • **
  • Posts: 65
  • I am just a normal ???? people.
    • View Profile
    • [Akatsuki]Konoha
Help Me !
« 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 !
Anybody see my server: [Akatsuki]Konoha are pleased to come in. Why I choose that name? Because it just like in Naruto, got jutsu and mission based on Naruto's story. Sadly, only available for Friday, Saturday and Sunday. More sadly is maybe not available for 3 month starting from Jun.

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Help Me !
« Reply #1 on: June 17, 2013, 10:55:04 am »
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]
I'm beginning to feel like a Lag God, Lag God

Offline [Saint]

  • Made Man
  • ***
  • Posts: 126
  • Pawn scripting for SA:MP and VC:MP
    • View Profile
    • vk.com/vicecitymultiplayer
Re: Help Me !
« Reply #2 on: June 17, 2013, 11:26:13 am »
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

« Last Edit: June 17, 2013, 11:32:36 am by [Saint] »


Russian Сommunity

Вступайте в группу: vk.com/vicecitymultiplayer

My profile on sa-mp.com

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Help Me !
« Reply #3 on: June 17, 2013, 03:59:33 pm »
Good Saint  ::)

Offline [Akatsuki]Itachi

  • Wiseguy
  • **
  • Posts: 65
  • I am just a normal ???? people.
    • View Profile
    • [Akatsuki]Konoha
Re: Help Me !
« Reply #4 on: June 18, 2013, 09:24:12 am »
thx guys !  ;D
Anybody see my server: [Akatsuki]Konoha are pleased to come in. Why I choose that name? Because it just like in Naruto, got jutsu and mission based on Naruto's story. Sadly, only available for Friday, Saturday and Sunday. More sadly is maybe not available for 3 month starting from Jun.