OnPlayerText question
#1

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;
}
Now you cant say anything except that in the code above, But thats only if you say /911,
So how can i make it return 0; on them things but return 1; on onplayertext itself
Reply


Messages In This Thread
OnPlayerText question - by Torran - 24.02.2010, 15:06
Re: OnPlayerText question - by VonLeeuwen - 24.02.2010, 15:49
Re: OnPlayerText question - by Torran - 24.02.2010, 16:00
Re: OnPlayerText question - by Joe Staff - 24.02.2010, 16:03

Forum Jump:


Users browsing this thread: 1 Guest(s)