HELP VEHICLES
#5

Indent your work better, and don't add 'IsPlayerConnected' to command especially since a player can't type a command if he's not connected!
pawn Код:
if(strcmp(cmd, "/BreakIn", true) == 0)
{
  if(Toolkit[playerid] == 1)
  {
    new Float:x,Float:y,Float:z;
    for(new vehicleid;vehicleid<MAX_VEHICLES;vehicleid++)
    {
      GetVehiclePos(vehicleid,x,y,z);
      if(IsPlayerInRangeOfPoint(playerid,10.0,x,y,z))
      {
        switch(VehicleInfo[vehicleid][vLock])
        {
          case 0: Break[playerid] = 20;
          case 1: Break[playerid] = 40;
          case 2: Break[playerid] = 60;
          default: Break[playerid] = 80;
        }
        BreakingInCount(playerid, vehicleid);
        return 1;
      }
    }
    return SendClientMessage(playerid,0xFFFFFFFF,"You're not near a vehicle.");
  }
  else
  {
    SendClientMessage(playerid, COLOR_GREY, "You don't have a Toolkit!");
    return 1;
  }
  return 1;
}
Reply


Messages In This Thread
HELP VEHICLES - by Ro[X]y - 13.03.2010, 15:43
Re: HELP VEHICLES - by Joe Staff - 13.03.2010, 15:53
Re: HELP VEHICLES - by Ro[X]y - 13.03.2010, 16:04
Re: HELP VEHICLES - by Deat_Itself - 13.03.2010, 16:10
Re: HELP VEHICLES - by Joe Staff - 13.03.2010, 16:20
Re: HELP VEHICLES - by Ro[X]y - 13.03.2010, 16:25
Re: HELP VEHICLES - by Joe Staff - 13.03.2010, 16:26
Re: HELP VEHICLES - by Ro[X]y - 13.03.2010, 16:32
Re: HELP VEHICLES - by Joe Staff - 13.03.2010, 16:38
Re: HELP VEHICLES - by Ro[X]y - 13.03.2010, 16:42

Forum Jump:


Users browsing this thread: 1 Guest(s)