17.09.2013, 11:48
Quote:
CMD:newbie(playerid, params[]) { if(playerVariables[playerid][pNewbieTimeout] > 0 && playerVariables[playerid][pAdminLevel] < 1) { SendClientMessage(playerid,COLOR_GREY, "You must wait until you can speak again in the newbie chat channel."); return 1; } if(!isnull(params)) { GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME); if(playerVariables[playerid][pAdminLevel] > 0 && playerVariables[playerid][pAdminDuty] != 0) { format(szMessage, sizeof(szMessage), "[NEWBIE CHAT] Admin %s: %s", szPlayerName, params); } else if(playerVariables[playerid][pHelper] >= 1 && playerVariables[playerid][pHelperDuty] >= 1) { format(szMessage, sizeof(szMessage), "[NEWBIE CHAT] Helper %s: %s", szPlayerName, params); playerVariables[playerid][pNewbieTimeout] = 5; } else if(playerVariables[playerid][pPlayingHours] >= 23) { format(szMessage, sizeof(szMessage), "[NEWBIE CHAT] Player %s: %s", szPlayerName, params); playerVariables[playerid][pNewbieTimeout] = 25; } else if(playerVariables[playerid][pPlayingHours] >= 47) { format(szMessage, sizeof(szMessage), "[NEWBIE CHAT] Professional Player %s: %s", szPlayerName, params); playerVariables[playerid][pNewbieTimeout] = 20; } else if(playerVariables[playerid][pPlayingHours] >= 96) { format(szMessage, sizeof(szMessage), "[NEWBIE CHAT] Expert Player %s: %s", szPlayerName, params); playerVariables[playerid][pNewbieTimeout] = 15; } else if(playerVariables[playerid][pAdminLevel] > 0 && playerVariables[playerid][pAdminDuty] == 0) { format(szMessage, sizeof(szMessage), "[NEWBIE CHAT] Legend Player %s: %s", szPlayerName, params); } else { format(szMessage, sizeof(szMessage), "[NEWBIE CHAT] Newbie %s: %s", szPlayerName, params); playerVariables[playerid][pNewbieTimeout] = 30; } foreach(Player, x) { if(playerVariables[x][pStatus] >= 1 && playerVariables[x][pNewbieEnabled] == 1) { SendClientMessage(x, COLOR_NEWBIE, szMessage); } } } else { return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/(n)ewbie [question]"); } return 1; } |
can someone fix the cmd ?
thanks
