24.08.2010, 06:00
Okay, i have a small problem.. no errors or nothing everything is right but once you use the command it does not work well it does but it just says "Player didn't send a /helpme message or it's already answered to.", even though a question has been asked. Any solutions?
Thanks in advanced, and here is the code.
Thanks in advanced, and here is the code.
Код:
if(strcmp(cmd, "/accepthelpme", true) == 0 || strcmp(cmd, "/ahm", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first !"); return 1; } if(PlayerInfo[playerid][pHelper] > 1) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendHelperMessage(COLOR_WHITE, "HINT: /(a)ccept(h)elp(m)e [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(JustAsked[giveplayerid] > 0) { JustAsked[giveplayerid] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GiveNameSpace(sendername); GiveNameSpace(giveplayer); format(string, sizeof(string), "Helperwarning: %s has just accepted the /helpme of [ID:%d]%s.", sendername, giveplayerid, giveplayer); SendHelperMessage(COLOR_YELLOW, string); format(string, sizeof(string), "** PL:RP Helper [ID:%d]%s has accepted your question and is now ready to assist you! Please be patience.", playerid, sendername); SendClientMessage(giveplayerid, 0x4D903DAA, string); } else { SendClientMessage(playerid, COLOR_GREY, "Player didn't send a /helpme message or it's already answered to."); return 1; } } } } else { SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); return 1; } } return 1; }