16.08.2012, 07:08
Where would I put commands such at a strcmp command? what line e.g.: OnPlayerConnect()
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
I've seen a server with no commands... A mini-missions server which made good use of the OnPlayerKeyStateChange callback and the OnPlayerEnterCheckpoint callback.
|
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do another thing here return 1; } return 0; }