/GiveAllDrugs
#1

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;
}
Reply
#2

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;
   }
}

Reply
#3

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;
Reply
#4

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

Quote:
Originally Posted by lolzer
Fail ^^
Reply
#6

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

Код:
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..
Reply
#8

hasweed[i]+=50;
Reply
#9

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;
    }
Reply
#10

OMG guys, please look at the date of the post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)