ZCMD command used by KeyStateChange, help plox
#1

Hello guys how i can make my zcmd command put into keystate change?
My begin of zcmd cmd

pawn Код:
COMMAND:majak(playerid,cmdtext[])
Thanks
Reply
#2

I don't understand,you want to put a command in OnPlayerKeyStateChange ?
for what ?
Reply
#3

I want to put my command created by ZCMD to OnPlayerKeyStateChange, so it will use this command when I press some key.
Reply
#4

pawn Код:
cmd_majak( playerid, "" ); // under OnPlayerKeyStateChange
Reply
#5

( playerid, "WHAT TO ADD HERE? " );
Reply
#6

This is not ZCMD to be honest.

COMMAND:majak(playerid,cmdtext[])


Original command:
pawn Код:
COMMAND:majak(playerid, params[]) // if you're not using params, remove params[]
// OR
CMD:majak(playerid, params[])
// OR
command(majak, playerid, params[])
For redirecting the command, you can use
pawn Код:
cmd_majak(playerid, params);
Reply
#7

at redirecting the command can I use cmd_majak(playerid, cmdtext); ? Becouse on my cmd im not using params but cmdtext COMMAND:majak(playerid,cmdtext[])

//Second question, how I can make so player when type /majak this command not work this way? Becouse I want to make this command only with hotkey
Reply
#8

You can use it exactly how I gave you the example.

Why ? Then, add the code directly at OnPlayerKeyStateChange, or make a function with that code and call it.
Reply
#9

Well i will try it using params, edited cmdtext to params redirected compiled and got his

C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(2 79) : error 029: invalid expression, assumed zero
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(2 79) : error 017: undefined symbol "params"
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(2 79) : error 029: invalid expression, assumed zero
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(2 79) : fatal error 107: too many error messages on one line

pawn Код:
COMMAND:majak(playerid, params[])//279 line
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)