Can't get my car ownership to work
#8

This is a little updated code, i can't get it work.. I don't know what i have to do, tryed everything!!
pawn Код:
dcmd_buycar(playerid, params[])
{
    new car;
    new carid[256];
    format(carid, 256, "%d", GetPlayerVehicleID(playerid));
  new confirm[64];
  sscanf(params, "s", confirm);
  if(IsPlayerInAnyVehicle(playerid))
  {
    if(strcmp(params, "confirm", true) == 0)
    {
      if(car == 0)
      {
        SendClientMessage(playerid, COLOR_YELLOW, "This car is not for sale!");
        }
        else if(car == 1)
        {
          SendClientMessage(playerid, COLOR_YELLOW, "You bought this car for $10000, check /vhelp for commands.");
          dini_Create(carid);
          dini_Set(carid, "name", file);
          car = 0;
        }
    }
    else
    {
        if(GetVehicleModel(playerid) == 404)
        {
          SendClientMessage(playerid, COLOR_YELLOW, "This car costs $10000, type /buycar confirm to buy it.");
          car = 1;
        }
        else
        {
          SendClientMessage(playerid, COLOR_YELLOW, "This car is not for sale!");
        }
    }
    }
    else
    {
      SendClientMessage(playerid, COLOR_YELLOW, "You are'nt in a vehicle!");
    }
    return 1;
}
Reply


Messages In This Thread
Can't get my car ownership to work - by Danand - 09.04.2009, 12:46
Re: Can't get my car ownership to work - by gijsmin - 09.04.2009, 13:12
Re: Can't get my car ownership to work - by Danand - 09.04.2009, 13:20
Re: Can't get my car ownership to work - by hanzen - 09.04.2009, 14:31
Re: Can't get my car ownership to work - by Danand - 09.04.2009, 14:36
Re: Can't get my car ownership to work - by ICECOLDKILLAK8 - 09.04.2009, 15:00
Re: Can't get my car ownership to work - by Danand - 10.04.2009, 14:08
Re: Can't get my car ownership to work - by Danand - 10.04.2009, 14:10
Re: Can't get my car ownership to work - by Danand - 10.04.2009, 19:49
Re: Can't get my car ownership to work - by Danand - 10.04.2009, 23:46

Forum Jump:


Users browsing this thread: 1 Guest(s)