SA-MP Forums Archive
/GiveAllDrugs - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /GiveAllDrugs (/showthread.php?tid=89771)



/GiveAllDrugs - Sal_Kings - 04.08.2009

So i use this drug system on my server...
And i want it so when i type /givealldrugs everyone gets +50 Drugs

This is all i can do on my self...

Код:
if(!strcmp(cmdtext,"/GiveAllDrugs",true))
  {
  SendClientMessageToAll(COLOR_BLUE,"You now have 50+ Drugs!)
  hasweed[playerid]++;
  return 1;
}



Re: /GiveAllDrugs - Zeromanster - 04.08.2009

Try this:

pawn Код:
if(!strcmp(cmdtext,"/GiveAllDrugs",true))
{
  for(new i=0; i<MAX_PLAYERS; i++)
  {
     if(IsPlayerConnected(i))
     {
        SendClientMessageToAll(COLOR_BLUE,"You now have 50+ Drugs!)
        hasweed[i]+50;
     }
     return 1;
   }
}




Re: /GiveAllDrugs - Sal_Kings - 04.08.2009

Quote:
Originally Posted by Zeromanster
Try this:

pawn Код:
if(!strcmp(cmdtext,"/GiveAllDrugs",true))
{
  for(new i=0; i<MAX_PLAYERS; i++)
  {
     if(IsPlayerConnected(i))
     {
        SendClientMessageToAll(COLOR_BLUE,"You now have 50+ Drugs!)
        hasweed[i]+50;
     }
     return 1;
   }
}

Just 1 bug

Код:
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(817) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
This is the line it said "Had no effect"
Код:
hasweed[i]+50;



Re: /GiveAllDrugs - lolzer - 11.06.2010

http://forum.sa-mp.com/index.php?top...msg1071206#new


Re: /GiveAllDrugs - ViruZZzZ_ChiLLL - 11.06.2010

Quote:
Originally Posted by lolzer
Fail ^^


Re: /GiveAllDrugs - snoob - 12.06.2010

... add ; at the end of SendClientMessageToAll(COLOR_BLUE,"You now have 50+ Drugs!)


Re: /GiveAllDrugs - Kar - 12.06.2010

Код:
if(!strcmp(cmdtext,"/GiveAllDrugs",true))
{
  for(new i=0; i<MAX_PLAYERS; i++)
  {
if(IsPlayerConnected(i))
{
        SendClientMessageToAll(COLOR_BLUE,"You now have 50+ Drugs!);
        hasweed[i]+50;
     }
     return 1;
   }
}
there..


Re: /GiveAllDrugs - Babul - 12.06.2010

hasweed[i]+=50;


Re: /GiveAllDrugs - CuervO - 12.06.2010

pawn Код:
if(!strcmp(cmdtext,"/GiveAllDrugs",true))
    {
        for(new i=0; i<MAX_PLAYERS; i++)
      {
            if(IsPlayerConnected(i))
            {
                hasweed[i] += 50;
            }
        }
        SendClientMessageToAll(COLOR_BLUE,"You now have 50+ Drugs!);
        return 1;
    }



Re: /GiveAllDrugs - ViruZZzZ_ChiLLL - 12.06.2010

OMG guys, please look at the date of the post