23.09.2014, 18:58
So I have completed my stock and I'm having a few issues, this is the completed stock:
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.
Код:
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; }
So what I'm trying to say is the stock is just returning everything as Weed even if you enter something like Meth.