22.05.2013, 02:42
Hello.
Your variable tmp is any array, or you could call it a string in this case.
To check if a string variable is equal to a value, you need to use the function strcmp.
Here is the SA:MP wiki page on the function.
You basically need to replace the lines:
With:
Hopefully the wiki will answer your questions on how to use strcmp, but if not, feel free to reply here.
Also, I'd recommend researching and learning to use one of these command systems (like ZCMD) that the person above recommended, as they run a lot quicker.
Your variable tmp is any array, or you could call it a string in this case.
To check if a string variable is equal to a value, you need to use the function strcmp.
Here is the SA:MP wiki page on the function.
You basically need to replace the lines:
pawn Код:
if(tmp == "boot"){
...
} else if(tmp == "bonnet"){
...
} else if(tmp == "alarm"){
pawn Код:
if(!strcmp(tmp,"boot",true)){
...
} else if(!strcmp(tmp,"bonnet",true)){
...
} else if(!strcmp(tmp,"alarm",true)){
Also, I'd recommend researching and learning to use one of these command systems (like ZCMD) that the person above recommended, as they run a lot quicker.