SA-MP Forums Archive
Strcmp help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Strcmp help (/showthread.php?tid=615853)



Strcmp help - Tass007 - 28.08.2016

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.

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    new 
strr1[128]; //Create "str1"
    
new str2[128]; //Create "str2"
    
new str3[128]; //Create "str3"
    
new str4[128]; //Create "str4"
    
format(strr1sizeof(strr1), "%s",show_export_cmd); //Format "str1"
    
format(str2sizeof(str2), "%s",hide_export_cmd); //Format "str2"
    
format(str3sizeof(str3), "%s",clear_export_cmd);//Format "str3"
    
format(str4sizeof(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
        
{
                ....
        }.... 
If anyone could show me an example of this just one line of CMD:.... would be great and explaining it please.


Re: Strcmp help - Konstantinos - 28.08.2016

It is really bad coded but anyway, how show_export_cmd, hide_export_cmd, clear_export_cmd and car_names_cmd are defined?


Re: Strcmp help - Tass007 - 28.08.2016

Omg...I had a blonde moment. It's okay I managed to change it.