[Help] Drugs System
#1

Hello,

I am working on a Drugs System but I'm stuck at some points. I've got 2 questions.

How can the drugs be saved for that account?

How can I make something that automaticly gives 1 gram drugs each hour?


This is my filterscript:
http://pastebin.com/m6fd15dce

I hope someone can answer this questions for me.
Reply
#2

for the account mmm i dunno maybe use a scriptfile
and the other question you can make a timer
Reply
#3

Give some command examples pl0x.
Reply
#4

The timer is simple, do something like this
pawn Код:
//Top of script
forward DrugUpdate();

//public OnGameModeInit()
SetTimer("DrugUpdate", 60000, 1);

//somewhere after main()
DrugUpdate()
{
  for(new i = 0; i<MAX_PLAYERS; i++)
  {
   GivePlayerDrug[playerid]++; //or whatever the variable you are using to save the drugs
  }
}
As for the account stuff, I don't have the time to look at the pastebin right now, I might be able to later.
Reply
#5

Код:
C:\Documents and Settings\Joeri\Bureaublad\samp server\filterscripts\Weed.pwn(230) : warning 203: symbol is never used: "DrugUpdate"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#6

Quote:
Originally Posted by Joeri
Код:
C:\Documents and Settings\Joeri\Bureaublad\samp server\filterscripts\Weed.pwn(230) : warning 203: symbol is never used: "DrugUpdate"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Why you post that? You just never use DrugUpdate in your script and that`s all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)