28.08.2016, 09:12
Hey guys. I'm trying to convert this strcmp code to zcmd. I just need help with the start of it. This is the code.
If anyone could show me an example of this just one line of CMD:.... would be great and explaining it please.
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new strr1[128]; //Create "str1"
new str2[128]; //Create "str2"
new str3[128]; //Create "str3"
new str4[128]; //Create "str4"
format(strr1, sizeof(strr1), "%s",show_export_cmd); //Format "str1"
format(str2, sizeof(str2), "%s",hide_export_cmd); //Format "str2"
format(str3, sizeof(str3), "%s",clear_export_cmd);//Format "str3"
format(str4, sizeof(str4), "%s",car_names_cmd); //Format "str4"
if (strcmp(strr1,cmdtext,true) == 0) //If he types the command to show export
{
.....
}
if (strcmp(str2,cmdtext,true) == 0) //If he types the command to hide export
{
....
}....