Command not working
#1

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
Reply
#2

please can u help me :3
Reply
#3

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

i wan't to make command with ZCMD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)