09.04.2009, 09:44
When I add more then 1 IF under OnPlayerCommandText alot of error come and when I fix them all only the unreachable code stays there, i cant fix it, help !!!!
Quote:
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; new name[MAX_PLAYER_NAME], string[48]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "Welcome to Mayor %s", name ); if(strcmp(cmdtext, "/**********", true) == 0) { SendClientMessageToAll(0xFFFF00AA, string); SetPlayerSkin(playerid, 147); SetPlayerPos(playerid, 1044.4341,1012.6452,11.0000); return 1; } else { SendClientMessage(playerid, 0xFFFFFFAA, "Unknown Command"); return 1; } if(strcmp(cmd, "/help moneygrub", true) == 1) { return 1; } if(strcmp(cmd, "/tips moneygrub", true) == 0) { return 1; } return 0; } |