18.07.2016, 13:30
Код:
enum pInfo { pMutedTime, //Тук ще се запише времето за което е заглушен pTest, pKey[256], ExpS, pTazerBullets, pIP[21], pO, pRobTime, pJobTimer, pIgnorePM, pNPM, VGod, pAdmin, pCOP, pSilenSkill, Prefix[60], pDrugPerk, pDrugs, pDis, pEvent, pAccount, pManage, pDuty, aTog, pRank, pMember, pBanned, pBlock, pDonateRank, pBV, pWarns, pAWarns, pFWarns, pReg, pCash, pKills, pDeaths, pGun0, pGun1, pGun2, pGun3, pGun4, pGun5, pGun6, pGun7, pGun8, pGun9, pGun10, pGun11, pGun12, pModel, pMuted, prMuted, ptrMuted, ptMuted, pvMuted, paMuted, pvtMuted, patMuted, pfMuted, pftMuted, pSpree, Float:pCalcSec, pCWons, pLotto, pHide, pJailed, pCrimes, pWantedLevel, pWantedDeaths, pJail, pHealme, pFixme, pRes, pKill, pArmourme, AFKstatus, Level, Exp, pJailTime, WsSkill, pDmon, pV, EpSkill, LevelSkill, MoneySkill }; new PlayerInfo[MAX_PLAYERS][pInfo];
Код:
if(!strcmp(cmd,"/setprefix",true)) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_WHITE,"Usage: /setprefix [playerid] [Prefix text]"); } new para1,prefix[60]; para1 = ReturnUser(tmp); prefix = strtok(cmdtext,idx); printf("PREFIX: %s",prefix); if(!strlen(prefix)) { return SendClientMessage(playerid,COLOR_WHITE,"Usage: /setprefix [playerid] [Prefix text]"); } if (PlayerInfo[playerid][pAdmin] >= 6) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1,giveplayer,sizeof giveplayer); format(string,sizeof string,"PREFIX: Administrator {FFFF00}%s{00FFFF} set you PREFIX{FFFF00} %s{00FFFF}. Congratulations!",PlayerName(playerid),prefix); SendClientMessage(para1,COLOR_ORANGE,string); strcat(PlayerInfo[para1][Prefix],prefix); format(string, sizeof(string), "PREFIX: {FFFF00}%s {00FFFF} now have PREFIX {FFFF00}%s{00FFFF}. Congratulations!", giveplayer, prefix); SendClientMessageToAll(COLOR_ORANGE, string); } } } else { SendClientMessage(playerid, COLOR_RED, "You have no access to this command!"); } return 1; }