[HELP] Small Problem -
Oscii - 12.05.2012
Hello..
I have a command, /service
But when someone types /service bus .. it does not sendclientmessage to the bus drivers..
pawn Код:
else if(strcmp(choice,"bus",true) == 0)
{
if(BusDrivers < 1)
{
SendClientMessageEx(playerid, COLOR_GREY, " There are no bus drivers at the moment, try again later!");
return 1;
}
if(TransportDuty[playerid] > 0)
{
SendClientMessageEx(playerid, COLOR_GREY, " You can't call for a bus now!");
return 1;
}
format(string, sizeof(string), "** %s is in need of a bus driver - use /accept bus to accept the call.", GetPlayerNameEx(playerid));
SendJobMessage(14, TEAM_AZTECAS_COLOR, string);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You have called for a bus driver, wait for a reply.");
BusCall = playerid;
PlayerInfo[playerid][pServiceTime] = 30;
return 1;
}
Thats the code for the /service bus..
This does not manage to reach the bus drivers
pawn Код:
format(string, sizeof(string), "** %s is in need of a bus driver - use /accept bus to accept the call.", GetPlayerNameEx(playerid));
Need anymore information, just leme know
Re: [HELP] Small Problem +1rep -
FalconX - 12.05.2012
Consider showing your SendJobMessage stock or callback whatever it is and if you want to show that to all you can always use SendClientMessageToAll to send the message to all the players in the server.
-FalconX
Re: [HELP] Small Problem +1rep -
Oscii - 12.05.2012
pawn Код:
public SendJobMessage(job, color, string[])
{
foreach(Player, i)
{
if((PlayerInfo[i][pJob] == job || PlayerInfo[i][pJob2] == job) && JobDuty[i] == 1)
{
SendClientMessageEx(i, color, string);
}
}
}
Is that it?
Or is this it?
pawn Код:
forward SendJobMessage(job, color, string[]);
Re: [HELP] Small Problem -
Face9000 - 13.05.2012
pawn Код:
forward SendJobMessage(const string[]);
pawn Код:
public SendJobMessage(job, color, string[])
{
foreach(Player, i)
{
if((PlayerInfo[i][pJob] == job || PlayerInfo[i][pJob2] == job) && JobDuty[i] == 1)
{
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
}
}
Re: [HELP] Small Problem -
Oscii - 13.05.2012
Thank you!,
Do you know what the problem was? or is?
Re: [HELP] Small Problem -
Face9000 - 13.05.2012
SendClientMessageEX,you don't need the EX parameter if you're send a message to the player.
Also,the color was not defined.
And the "job" thing in the forward,you just dont need it,you've to just forward the string created before.