Help me!
#1

I had problems yesterday with this,and I'm kinda new to "loops" .A beta tester told me :"You should be using the loop to identify the ID of the driver of the ambulance and then storing that ID for later use. See usage of GetPlayerVehicleID and comparing it to vehicleid passed by the callback."

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new playerid2;
    if(gTeam[playerid2] == TEAM_MEDICS)
    {
      if(GetPlayerState(playerid2) == PLAYER_STATE_DRIVER && GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
      {
        GetVehicleModel(vehicleid);
        if(vehicleid == 416)
        {
          new Float:health;
          GetPlayerHealth(playerid,health);
          if(health < 80)
          {
            SetPlayerHealth(playerid,100);
            GivePlayerMoney(playerid,-500);
            GivePlayerMoney(playerid2,500);
            SetPlayerScore(playerid2,GetPlayerScore(playerid2) + 2);
            new medicname[24];
            new healedname[24];
            new string[128];
            GetPlayerName(playerid,healedname,sizeof(healedname));
            GetPlayerName(playerid2,medicname,sizeof(medicname));
            format(string,sizeof(string),"%s has been healed by medic %s.",healedname,medicname);
            SendClientMessageToAll(COLOR_GREY,string);
        }
       }
     }
   }
    return 1;
}
I'm new to loops so please help,gvie me an example and pls don't give me just the wiki@loops
Reply


Messages In This Thread
Help me! - by Cjgogo - 27.05.2011, 15:22
Re: Help me! - by Cjgogo - 27.05.2011, 15:50
Re: Help me! - by Cjgogo - 27.05.2011, 16:33
a few thoughts - by KoczkaHUN - 27.05.2011, 20:07
Re: Help me! - by BigETI - 27.05.2011, 20:55
Re: Help me! - by Cjgogo - 28.05.2011, 05:16

Forum Jump:


Users browsing this thread: 1 Guest(s)