[QUESTION/PROBLEM] Can I make dcmd with space ?
#1

Hey scripters...
I tried to make this dcmd command
dcmd(accept ticket,13,cmdtext);
And It gave me 4 errors .....
Reply
#2

strtok
edit: sec writing a code
edit2: actually strcmp


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  dcmd(accept, 6, cmdtext);
  return 0;
}

dcmd_accept(playerid, params[])
{
  if(!strlen(params)) return 0;
  if(!strcmp(params, "ticket", true))
  {
     //DO COMMAND TEXT HERE
  }
  else return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)