10.04.2012, 09:28
Hello , today I changed The Job Car mechanic I did it An Faction , but I have an problem , When I type /duty and somebody /call 555 doesen't appear nothing because he send (SendJobMessage) at iD 7 , and I don't know to do it to send at an Faction and i don't have something like sendFactionMessage... only SendJobMessage
The /call 555 code is
How Can I make to sendClientMessage to the faction with id 15?
Код:
forward SendJobMessage(job, color, string[]); forward SendFamilyMessage(family, color, string[]); forward SendNewFamilyMessage(family, color, string[]); forward SendIRCMessage(channel, color, string[]); forward SendTeamMessage(team, color, string[]); forward SendRadioMessage(member, color, string[]); forward SendAdminMessage(color, string[]); forward SendModeratorMessage(color, string[]);
Код:
if(phonenumb == 555) { new mechanicworkers = 0; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pLeader] == 15 || PlayerInfo[i][pMember] == 15 && JobDuty[i] == 1) { mechanicworkers++; } } } if(mechanicworkers < 1) { SendClientMessage(playerid, COLOR_GREY, " They Picked up the call."); SendClientMessage(playerid, 0xBBE1F2AA, "Men voice Says (cellphone): Sorry we have no mechanics available at the moment."); SendClientMessage(playerid, COLOR_GREY, " They hang up."); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "** %s is in need of a Car Mechanic. (use /accept mechanic to accept the call)", sendername); SendJobMessage(7, COLOR_WHITE, string); SendClientMessage(playerid, COLOR_GREY, " They Picked up the call."); SendClientMessage(playerid, 0xBBE1F2AA, "Men voice Says (cellphone): Hello, all mechanics at your area have been informed about your call."); SendClientMessage(playerid, COLOR_GREY, " They hang up."); MechanicCall = playerid; return 1; }