15.09.2009, 13:59
Код:
if (strcmp(cmd, "/name", true) ==0 ) { if (AccountInfo[playerid][AdminLevel] > 1 || IsPlayerAdmin(playerid)) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,WHITE, "[USAGE] /name off/on "); } else if(strcmp(tmp,"off",true) == 0) { for(new i=0;i<MAX_PLAYERS;i++) { ShowPlayerNameTagForPlayer(playerid,i,0); } SendClientMessage(playerid,WHITE,"Your name tags are hidden."); return 1; } else if(strcmp(tmp,"on",true) == 0) { for(new i=0;i<MAX_PLAYERS;i++) { ShowPlayerNameTagForPlayer(i,playerid,1); } SendClientMessage(playerid,WHITE,"Your name tags are viewable."); return 1; } else { SendClientMessage(playerid,WHITE,"Your are not a high enough rank."); } } return 1; }