24.02.2010, 15:06
pawn Code:
public OnPlayerText(playerid, text[])
{
if(CallEmergency[playerid] == 1)
{
if(!strcmp("police", text, true))
{
CallEmergency[playerid] = 0;
PoliceSelect[playerid] = 1;
SendClientMessage(playerid, COLOR_RED, "Please type in your situtation, Remember to include your location");
}
else if(!strcmp("paramedic", text, true))
{
CallEmergency[playerid] = 0;
ParamedicSelect[playerid] = 1;
SendClientMessage(playerid, COLOR_RED, "Please type in your situtation, Remember to include your location");
}
}
else if(PoliceSelect[playerid] == 1)
{
PoliceSelect[playerid] = 0;
new name[MAX_PLAYER_NAME];
new string[300];
GetPlayerName(playerid, name, sizeof(name));
SendClientMessage(playerid, COLOR_RED, "Your message has been confirmed and sent, Thankyou");
format(string, sizeof(string), "911 Call: (%s) %s", name, text);
SendTeamMessage(TEAM_POLICE, COLOR_ORANGE, string);
}
else if(ParamedicSelect[playerid] == 1)
{
ParamedicSelect[playerid] = 0;
new name[MAX_PLAYER_NAME];
new string[300];
GetPlayerName(playerid, name, sizeof(name));
SendClientMessage(playerid, COLOR_RED, "Your message has been confirmed and sent, Thankyou");
format(string, sizeof(string), "911 Call: (%s) %s", name, text);
SendTeamMessage(TEAM_MEDIC, COLOR_ORANGE, string);
}
return 0;
}
So how can i make it return 0; on them things but return 1; on onplayertext itself