Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

ZCMD Little problem cmdtext

$
0
0
Hi, how to solve cmdtext with zcmd?
I've declared strtok and ReturnUser
PHP Code:

forward OnPlayerCommandReceived(playeridcmdtext[]);
forward OnPlayerCommandPerformed(playeridcmdtext[], success);

CMD:id(playeridparams[]) {
    new 
tmp[256];
     new 
idx;
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playerid0xFF0000AA"/id [id/nome]");
                return 
1;
            }
            new 
target;
            
target ReturnUser(tmp);
            new 
sstring[256];
            if(
IsPlayerConnected(target))
            {
                if(
target != INVALID_PLAYER_ID)
                {
                    
format(sstringsizeof(sstring), "Nome: %s [ID: %d]",GetPlayerNameEx(target),target);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEsstring);
                }
            }
        }
        return 
1;
    } 

Errors
Code:

.pwn(345) : warning 217: loose indentation
.pwn(347) : error 017: undefined symbol "cmdtext"
.pwn(360) : error 017: undefined symbol "GetPlayerNameEx"
.pwn(344) : warning 203: symbol is never used: "idx"

2 Errors.


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>