Almost correct, Da Bishop. When checking for 0 or 1, those would need to be single quotes, I believe. Also the checking for 10 or 100 would never work because all you're doing is comparing the first char of the string to "10". Heh, how can one character be the same as "10". That's not going to work.
I would recommend creating a new variable and turning that argument string into a number. Checking it for some value will be much easier that way, I think.
Code:
#include <amxmod>
#include <amxmisc>
#define textlength 192
#pragma tabsize 0
public plugin_init()
{
register_plugin("test","073","MC-Olivenoel")
register_clcmd("make_test","maketest",0,"make the test")
}
public maketest(id)
{
new varil[textlength+1]
read_argv(1,varil,textlength)
new numvar = str_to_num(varil)
if (numvar == 0){
//numvar is 0
client_cmd(id,"say numvar is 0")
return PLUGIN_HANDLED
}
if (numvar == 1){
//numvar is 1
client_cmd(id,"say numvar is 1")
return PLUGIN_HANDLED
}
if (numvar == 10){
//numvar is 10
client_cmd(id,"say numvar is 10")
return PLUGIN_HANDLED
}
if (numvar == 200){
//numvar is 200
client_cmd(id,"say numvar is 200")
return PLUGIN_HANDLED
}
else {
client_cmd(id,"say numvar is not 0,1,10 or 200")
}
return PLUGIN_HANDLED
}