12.02.2009, 07:55
i dont know what u mean with hard to read, but now i got this:
and 1 warning:
Код:
#include <a_samp> public OnPlayerCommandText(playerid,cmdtext[]) { if(strcmp(cmdtext, "/color", true) == 0) { new params[128]; strmid(params, cmdtext, strfind(cmdtext, "", true)); { if (!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "[USAGE]: /color [YELLOW/GREEN/RED]"); } if (strcmp(params, "yellow", true) == 0) SetPlayerColor(playerid, 0xFFFF00AA); else if (strcmp(params, "green", true) == 0) SetPlayerColor(playerid, 0x33FF33AA); else if (strcmp(params, "red", true) == 0) SetPlayerColor(playerid, 0xFF0000AA); else SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: Invalid color."); return 1; } return 0; }
Код:
C:\Users\Martin\Desktop\PUTDETHERINTILSA-MP\colorcmds.pwn(8) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.