SA-MP Forums Archive
Command not working - 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: Command not working (/showthread.php?tid=521050)



Command not working - Eclips - 21.06.2014

Hello, i have problem with my command, please, can u help me ?

PHP код:
CMD:test(playeridparams[]) 

      if(
isnull(params)) return SCM(playerid, -1"/test [Action]\n\r[Actions] : money, vie, position, message"); 
      if(!
strcmp(params"money"true)) 
      { 
            new 
money
            if(
sscanf(params"s[6]d"params[0], money)) return SCM(playerid, -1"/test money [Argent]"); // Ce que je fait est extrкmement dйconseillй pour la lisibilitй mais c'est la mйthode la plus optimisйe 
            
GivePlayerMoney(playeridmoney); 
            return 
1
      } 
      else if(!
strcmp(params"vie"true)) 
      { 
            new 
Float:vie
            if(
sscanf(params"s[4]f"params[0], vie)) return SCM(playerid, -1"/test vie [Vie]"); 
            
SetPlayerHealth(playeridvie); 
            return 
1
      } 
      else if(!
strcmp(params"position"true)) 
      { 
            new 
Float:xFloat:yFloat:z
            if(
sscanf(params"s[9]fff"params[0], xyz)) return SCM(playerid, -1"/test position [X] [Y] [Z]"); 
            
SetPlayerPos(playeridxyz); 
            return 
1
      } 
      else if(!
strcmp(params"message"true)) 
      { 
            if(
isnull(params[8])) return SCM(playerid, -1"/test message [Message]"); 
            return 
SendClientMessageToAll(-1params[9]); 
      } 
      else return 
SCM(playerid, -1"/test [Action]\n\r[Actions] : money, vie, position, message"); 
That always return syntax command : /test [Action]\n\r[Actions] : money, vie, position, message
Thanks all


Re : Command not working - Eclips - 22.06.2014

please can u help me :3


Re: Command not working - Excel™ - 22.06.2014

https://sampwiki.blast.hk/wiki/Using_strcmp%28%29


Re : Command not working - Eclips - 25.06.2014

i wan't to make command with ZCMD