Is anything wrong in this script
#1

I have a dealership script from california im trying to edit it to make it work without dialogs so i get many errors with this lines , anything wrong here?

Код:
	if(strcmp(cmd, "/carbuy", true) == 0)
	{
	    new veh = GetPlayerVehicleID(playerid);
		if(VehOwned[veh] == 0)
		{
			if(IsADealerCar[veh] == 1)
			{
                new file[256], name[MAX_PLAYER_NAME];
  	         	GetPlayerName(playerid, name, sizeof(name));
			    format(file,sizeof(file),"Cars/%s.ini",name);
                new veh = GetPlayerVehicleID(playerid);
		        new money = GetPlayerMoney(playerid);
	            if(money >= CarPrice[veh])
	            {
	                if(gPlayerHasCar[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "You already own a car.");
	                new string[64];
	                SendClientMessage(playerid, 0xAFAFAFAA, "Thank you for buying at Coutt and Schutz.");
	                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
			    	dini_Create(file);
				    Vehicle[playerid] = CreateVehicle(GetVehicleModel(veh), 2130.1914, -1109.5881, 25.1890, 76.2599, 1, 1, 3600000);
                    format(string, sizeof(string), "Creating your vehicle %i.", veh);
	                SendClientMessage(playerid, 0xAFAFAFAA, string);
		    		VehicleInfo[playerid][Model] = GetVehicleModel(veh);
			    	VehicleInfo[playerid][Price] = CarPrice[veh];
				    VehicleInfo[playerid][CarX] = 2130.1914;
			    	VehicleInfo[playerid][CarY] = -1109.5881;
			    	VehicleInfo[playerid][CarZ] = 25.1890;
			    	VehicleInfo[playerid][CarRot] = 76.2599;
			    	gPlayerHasCar[playerid] = 1;
			    	RemovePlayerFromVehicle(playerid);
			    	OwnerID[Vehicle[playerid]] = playerid;
			    	VehPlate[Vehicle[playerid]] = "XYZR 000";
			    	PutPlayerInVehicle(playerid, Vehicle[playerid], 0);
			    	GivePlayerMoney(playerid, -VehicleInfo[playerid][Price]);
		        }
			    else
			    {
			       RemovePlayerFromVehicle(playerid);
			       SendClientMessage(playerid, 0xAFAFAFAA, "You cannot afford this vehicle.");
			       return 1;
   			    }
   			}
	}
Reply


Messages In This Thread
Is anything wrong in this script - by Swiftz - 20.02.2011, 10:05
Re: Is anything wrong in this script - by Swiftz - 20.02.2011, 23:05
Re: Is anything wrong in this script - by Swiftz - 21.02.2011, 23:03
Re: Is anything wrong in this script - by Stigg - 21.02.2011, 23:17
Re: Is anything wrong in this script - by maramizo - 21.02.2011, 23:57
Re: Is anything wrong in this script - by Swiftz - 22.02.2011, 01:49
Re: Is anything wrong in this script - by Antonio [G-RP] - 22.02.2011, 01:50
Re: Is anything wrong in this script - by Swiftz - 22.02.2011, 01:51
Re: Is anything wrong in this script - by Swiftz - 22.02.2011, 05:12
Re: Is anything wrong in this script - by Grazor - 22.02.2011, 11:09

Forum Jump:


Users browsing this thread: 2 Guest(s)