Array Must Be Indexed
#7

Quote:
Originally Posted by еddy
Quote:
Originally Posted by Μαστερμινδ
I think this is what you need

Код:
if(strcmp(params,"red",true) == 0)
I don't want to make a "/red" command...
Heres an example

pawn Код:
dcmd_setcolor(playerid, params[]) {
  if(!strlen(params)) return SendClientMessage(playerid, WHITE, "Use: /setcolor [color]");
  if(strcmp(params,"red",true) == 0) return SetPlayerColor(playerid, COLOR_RED);
  else if(strcmp(params,"blue",true) == 0) return SetPlayerColor(playerid, COLOR_BLUE);
  else return SendClientMessage(playerid, WHITE, "Unknown color..");
}
EDIT: np
Reply


Messages In This Thread
Array Must Be Indexed - by refshal - 17.07.2009, 21:39
Re: Array Must Be Indexed - by Jefff - 17.07.2009, 22:08
Re: Array Must Be Indexed - by M4S7ERMIND - 17.07.2009, 22:14
Re: Array Must Be Indexed - by refshal - 17.07.2009, 22:22
Re: Array Must Be Indexed - by Jefff - 17.07.2009, 22:30
Re: Array Must Be Indexed - by refshal - 17.07.2009, 22:33
Re: Array Must Be Indexed - by M4S7ERMIND - 17.07.2009, 22:35

Forum Jump:


Users browsing this thread: 1 Guest(s)