send a zcmd command that equal to a string text? (+REP)
#4

if I am not wrong you gotta use CallLocalFunction

PHP код:
COMMAND:forcecmd(playeridparams[]) 

    new 
targetidcmdstring[128]; 
    if(
sscanf(params"us"targetidcmdstring)) return SendClientMessage(playerid0xFF0000FF"wrong syntax,  
    usage; /forcecmd [player id] [command]"
);
    
CallLocalFunction("OnPlayerCommandText""is"targetidcmdstring); 
    
//cmd_cmdstring(playerid, params); 
    
return 1

COMMAND:kickme(playeridparams[]) 

    
Kick(playerid); 
    return 
1

as if you use OnPlayerCommandText directly it will just call the hooked one which not supposed to do any special thing to the commands.
Reply


Messages In This Thread
send a zcmd command that equal to a string text? (+REP) - by Lirbo - 08.01.2018, 12:05
Re: send a zcmd command that equal to a string text? (+REP) - by solstice_ - 08.01.2018, 12:07
Re: send a zcmd command that equal to a string text? (+REP) - by Ebisu - 08.01.2018, 12:20
Re: send a zcmd command that equal to a string text? (+REP) - by jlalt - 08.01.2018, 12:30
Re: send a zcmd command that equal to a string text? (+REP) - by Lirbo - 08.01.2018, 12:45

Forum Jump:


Users browsing this thread: 1 Guest(s)