Frostman |
Дата: Четверг, 27.12.2012, 09:36 | Сообщение # 1 | Сообщить о нерабочей теме
|
Регистрация: | 27.12.2012
|
Страна: | Российская Федерация |
Репутация: |
0
|
Сообщений: | 3 |
Награды: |
0
+
|
Статус: |
|
| Я хотел создать команды связано с Хелпером /hc, /makehelper, /hduty, /vopros, /otvet, /hmute. И у меня выдает вот такие ошибки
Код C:\Users\Àëåêñåé\Desktop\Ñàìï - Server\gamemodes\Sunshine(YourGame).pwn(26130) : error 017: undefined symbol "SendHelperMessage" C:\Users\Àëåêñåé\Desktop\Ñàìï - Server\gamemodes\Sunshine(YourGame).pwn(26233) : error 017: undefined symbol "SendHelperMessage" C:\Users\Àëåêñåé\Desktop\Ñàìï - Server\gamemodes\Sunshine(YourGame).pwn(26275) : error 017: undefined symbol "SendHelperMessage"
Вот сам код, искал ошибку.. Не могу найти.. Помогите пожалуйста. Код if(strcmp(cmd, "/hc", true) == 0) { if(PlayerInfo[playerid][pHelper] >= 1) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}.::SERVER {FF9000} /hc [òåêñò]"); switch(PlayerInfo[playerid][pHelper]) { case 1..3: format(string, sizeof(string), "{ffffff}[H] {efd334}%s {ffffff}%s",sendername, result),SendAdminMessage(COLOR_RED,string), SendHelperMessage(COLOR_WHITE, string); } } return true; } if(strcmp(cmdtext, "/hduty", true) == 0 || strcmp(cmdtext, "/helperduty", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "Âû íå àâòîðèçèðîâàíû!"); return 1; } if(PlayerInfo[playerid][pHelper] >= 1) { if(HelperDuty[playerid] == 0) { HelperDuty[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "(( [INFO] Helper %s æäåò âàøè âîïðîñû! (/vopros) ))", sendername); BroadCast(COLOR_OOC,string); return 1; } else if(HelperDuty[playerid] == 1) { HelperDuty[playerid] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "(( [INFO] Helper %s âðåìåííî íåäîñòóïåí. ))", sendername); BroadCast(COLOR_OOC,string); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "Ó âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîé êîìàíäû."); return 1; } } return 1; } //=============================================================================== if(strcmp(cmd, "/makehelper", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "{ffffff}{FFFFFF}.::SERVER {FF9000} /makehelper [playerid] [level(1-5, 0-óáðàòü õåëëïåðêó]"); new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(PlayerInfo[playerid][pHelper] == 5 || PlayerInfo[playerid][pAdmin] >= 7) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pHelper] = level; if(level < 0 || level > 5) return SendClientMessage(playerid, COLOR_GREY, "Íå ìåíüøå '0' è íå áîëüøå '5'."); format(string, sizeof(string), "Âû áûëè íàçíà÷åíû Õåëïåðîì óðîâíÿ %d Àäìèíèñòðàòîðîì %s.", level, sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Âû íàçíà÷èëè %s õåëïåðîì %d óðîâíÿ", giveplayer,level); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, "{ffffff}Âàì íå äîñòóïíà ýòà ôóíêöèÿ"); } } return true; } if(strcmp(cmd, "/vopros", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "{ffffff}Ââåäèòå: /vopros [text]"); return 1; } if(HelperDuty[playerid] == 1) { format(string, sizeof(string), "Âîïðîñ îò %s[%d]: %s", sendername, playerid, (result)); SendHelperMessage(0x10F441AA, string); } SendClientMessage(playerid, COLOR_YELLOW, "Âàø âîïðîñ îòïðàâëåí õåëïåðàì!"); format(string, sizeof(string), "Âîïðîñ îò %s[%d]: %s", sendername, playerid, (result)); SendClientMessage(playerid, COLOR_LIGHTRED, string); } return 1; } //=============================================================================== if(strcmp(cmd, "/otvet", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pHelper] >= 1) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "{ffffff}Ââåäèòå: /otvet [id] [òåêñò]"); { giveplayerid = ReturnUser(tmp); if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, COLOR_GRAD2, "{ffffff}Ââåäèòå: /otvet [id] [òåêñò]"); format(string, sizeof(string), "{efd334}« Àãåíò ïîääåðæêè » %s: {FFFFFF}%s", sendername, (result)); SendClientMessage(giveplayerid, COLOR_LIGHTGREEN, string); format(string, sizeof(string), "{efd334}« Àãåíò ïîääåðæêè » %s îòâåòèë %s[%d]: {FFFFFF}%s", sendername, giveplayer, giveplayerid,(result)); SendHelperMessage(COLOR_LIGHTRED, string); return true; } } else { format(string, sizeof(string), "%d íå â ñåòè", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } } } else { SendClientMessage(playerid, COLOR_WHITE, "Âû íå àâòîðèçèðîâàíû."); } return true; }
//============================================================================== //============================================================================== if(strcmp(cmd, "/hmute", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}.::SERVER {FF9000} /hmute [èä] [âðåìÿ] [ïðè÷èíà]"); new playa=ReturnUser(tmp); if(PlayerInfo[playerid][pHelper] >= 1) { if(IsPlayerConnected(playa)) { if(playa!=INVALID_PLAYER_ID) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}.::SERVER {FF9000} /hmute [èä] [âðåìÿ] [ïðè÷èíà]"); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}.::SERVER {FF9000} /hmute [èä] [âðåìÿ] [ïðè÷èíà]"); new second=strval(tmp); if(second <1 || second> 10000)return SendClientMessage(playerid, COLOR_GRAD2, "Håâåðíîå çíà÷åíèå!"); GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[playa][pMuted]=1; PlayerInfo[playa][pMuteTime]=second; if(PlayerInfo[playerid][pHelper] >= 1) { format(string, sizeof(string), "{efd334}%s {FFFFFF}ïîëó÷èë áàí ÷àòà îò Àãåíòà ïîääåðæêè {efd334}%s. {FFFFFF}Ïðè÷èíà: %s",giveplayer ,sendername,second, result); SendClientMessageToAll(COLOR_WHITE, string); } } } } } else { //SendClientMessage(playerid, COLOR_RED, " Ó âàñ íåò ïðàâ íà èñïîëüçîâàíèå ýòîé êîìàíäû!"); } return true; }
|
|
|
|
Frostman |
Дата: Четверг, 27.12.2012, 14:39 | Сообщение # 3 | Сообщить о нерабочей теме
|
Регистрация: | 27.12.2012
|
Страна: | Российская Федерация |
Репутация: |
0
|
Сообщений: | 3 |
Награды: |
0
+
|
Статус: |
|
| 26130 - case 1..3: format(string, sizeof(string), "{ffffff}[H] {efd334}%s {ffffff}%s",sendername, result),SendAdminMessage(COLOR_RED,string), SendHelperMessage(COLOR_WHITE, string); 26233- SendHelperMessage(0x10F441AA, string); 26275--- SendHelperMessage(COLOR_LIGHTRED, string);
Буду очень благодарен если поможете
Сообщение отредактировал Frostman - Четверг, 27.12.2012, 14:48 |
|
|
|