Will 'OnPlayerCommandText' work with ZCMD?
#1

Will it?

Example:
pawn Code:
CMD:example(playerid, params[])
{
print("Example");
return 1;
}

public OnPlayerConnect(playerid)
{
OnPlayerCommandText(playerid, "/example");
return 1;
}
It probably wont work, But if it dosent is there another way?
Reply
#2

Quote:
Originally Posted by Torran
Will it?

Example:
pawn Code:
CMD:example(playerid, params[])
{
print("Example");
return 1;
}

public OnPlayerConnect(playerid)
{
OnPlayerCommandText(playerid, "/example");
return 1;
}
It probably wont work, But if it dosent is there another way?
Try it out lol, it might work (i dont see a reason it wouldnt).
Reply
#3

Yup try it out, if doesn't work you could use 'return cmd_cmdhere'.
Reply
#4

Yes it will, since the only way to process a command is via OnPlayerCommandText
Reply
#5

If i did 'OnPlayerCommandText(playerid, "/quit");' Would that work? or..
Reply
#6

Quote:
Originally Posted by Torran
If i did 'OnPlayerCommandText(playerid, "/quit");' Would that work? or..
It wont work if its a client command.
Reply
#7

So, you want it to be so when a player "connects" to your server, it automatically sends a command, acting as if they "sent" it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)