SA-MP Forums Archive
[Help] Drugs System - 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: [Help] Drugs System (/showthread.php?tid=82231)



[Help] Drugs System - joeri55 - 17.06.2009

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.


Re: [Help] Drugs System - HuRRiCaNe - 17.06.2009

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


Re: [Help] Drugs System - joeri55 - 17.06.2009

Give some command examples pl0x.


Re: [Help] Drugs System - Grim_ - 17.06.2009

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.


Re: [Help] Drugs System - joeri55 - 17.06.2009

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



Re: [Help] Drugs System - Luka P. - 17.06.2009

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