Stock Help
#5

So I have completed my stock and I'm having a few issues, this is the completed stock:

Код:
stock GetDrugID (drugname[])
{
	new drugid;
	if(strcmp(drugname, "weed", true))
	{
		drugid = 1;
		return drugid;
	}
	else if(strcmp(drugname, "shrooms", true))
	{
		drugid = 2;
		return drugid;
	}
	else if(strcmp(drugname, "heroin", true))
	{
		drugid = 3;
		return drugid;
	}
	else if(strcmp(drugname, "lsd", true))
	{
		drugid = 4;
		return drugid;
	}
	else if(strcmp(drugname, "meth", true))
	{
		drugid = 5;
		return drugid;
	}
        return 1;
}
However in the command I'm using, you have to enter a drug name. And at the moment when I enter something like Meth, it still comes up as Weed.

So what I'm trying to say is the stock is just returning everything as Weed even if you enter something like Meth.
Reply


Messages In This Thread
Stock Help - by Joshayersm - 23.09.2014, 15:12
Re: Stock Help - by Vince - 23.09.2014, 15:31
Re: Stock Help - by Joshayersm - 23.09.2014, 15:35
Re: Stock Help - by XStormiest - 23.09.2014, 16:52
Re: Stock Help - by Joshayersm - 23.09.2014, 18:58
Re: Stock Help - by Vince - 23.09.2014, 22:05
Re: Stock Help - by Joshayersm - 24.09.2014, 04:22

Forum Jump:


Users browsing this thread: 1 Guest(s)