04.05.2011, 14:14
Hello, I am trying to do a /name off and /name on command for my server, for example, donators and admins can turn their name off by /name off, and other player aint able to see their names, same as /name on, but I want it to be only for ADMINS / DONATORS.
I have something like this, but I need zcmd, and I think this is not even similiar for donator - admin thingy..
I have something like this, but I need zcmd, and I think this is not even similiar for donator - admin thingy..
Код:
if (strcmp(cmd, "/name", true) ==0 ) { if (PlayerInfo[playerid][pRank] >= 4) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_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,COLOR_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,COLOR_WHITE,"Your name tags are viewable."); return 1; } else { SendClientMessage(playerid,COLOR_WHITE,"Your are not a high enough rank."); } } return 1; }