18.07.2016, 13:08
Код:
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(pInfo[playerid][Adminlevel] >= 6 || IsPlayerAdmin(playerid)) { 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(pInfo[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; }
Код:
Error:(14006) : error 017: undefined symbol "Prefix"
Код:
strcat(pInfo[para1][Prefix],prefix);