Medic Heal player in ambulance
#2

Try that (didn't test it..):
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new index, cmd[20];
    cmd = strtok(cmdtext, index);
    if(strcmp(cmd, "/soigner", true) == 0)
    {
        new vid = GetVehicleModel(vehicleid);
        if(vid != 416) return SendClientMessage(playerid, COLOR_RED, "You are not in an ambulance!");
        new seat = GetPlayerVehicleSeat(playerid);
        if(seat == 1 || seat == 2 || seat == 3)
        {
            if(cTeam[playerid] == TEAM_MEDIC)
            {
                new tmp[20], id;
                tmp = strtok(cmdtext, index);
                if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /soigner [playerid]");
                id = strval(tmp);
                if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID)
                {
                    SetPlayerHealth(id, 100.0);
                    SendClientMessage(id, COLOR_LIGHTBLUE, "Vous avez e'te' soigne' par un medecin.");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vous soignez cette personne.");
                }
                else return SendClientMessage(playerid, 0xFF0000AA, "[x] Cette personne n'existe pas.");//that's person don't exist
            }
            else return SendClientMessage(playerid, COLOR_RED, "Vous n'e^tes pas me'decin");
        }
        else return SendClientMessage(playerid, COLOR_RED, "You are not a passenger!");
        return 1;
    }
    return 0; // Returns SERVER: Unknown command.
}
Reply


Messages In This Thread
Medic Heal player in ambulance - by Vukilore - 07.01.2011, 06:50
Re: Medic Heal player in ambulance - by Toreno - 07.01.2011, 07:09
Re : Medic Heal player in ambulance - by Vukilore - 07.01.2011, 07:11
Re : Medic Heal player in ambulance - by Vukilore - 07.01.2011, 07:18
Re: Medic Heal player in ambulance - by veyron - 07.01.2011, 07:21
Re : Medic Heal player in ambulance - by Vukilore - 07.01.2011, 07:29
Re : Medic Heal player in ambulance - by Vukilore - 11.01.2011, 18:07
Re: Medic Heal player in ambulance - by _rAped - 11.01.2011, 18:15
Re : Medic Heal player in ambulance - by Vukilore - 12.01.2011, 09:56

Forum Jump:


Users browsing this thread: 3 Guest(s)