Help !(Script for vehicle system is bugging)
#1

PHP код:
    else if(dialogid == 11// Bikes
    
{
        new 
string[128], caridprice;
        if(
response)
        {
            switch(
listitem)
            {
                case 
0: {carid 481price 500;} //BMX
                
case 1: {carid 462price 1000;} //Faggio
                
case 2: {carid 586price 9000;} //Wayfarer
                
case 3: {carid 463price 14000;} //Freeway
                
case 4: {carid 521price 17000;} //FCR-900
                
case 5: {carid 581price 19000;} //BF-400
                
case 6: {carid 461price 20000;} //PCJ-600
                
case 7: {carid 471price 15000;} //Quad
            
}
            if(
price PlayerInfo[playerid][pMoney]) return SendClientMessage(playeridCOLOR_GREY"You don't have enough money on you.");
            
GiveDodMoney(playerid, -price);
             
format(stringsizeof(string), " You have purchased a %s. (Unlock it using /lock)"RVN(carid));
            
SendClientMessage(playeridCOLOR_GREENstring);
            if(
PlayerInfo[playerid][vModel])
            {
                
PlayerInfo[playerid][pVVeh] = CreateVehicle(carid, -144.9922,1117.5718,19.7500,0.8660,0,0,1200);
                
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0001000);
                
PlayerInfo[playerid][vVLocked] = 1;
                
PlayerInfo[playerid][vVModel] = carid;
                
GetVehiclePos(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVX], PlayerInfo[playerid][vVY], PlayerInfo[playerid][vVZ]);
                
GetVehicleZAngle(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVA]);
                
PlayerInfo[playerid][vVC1] = 0;
                
PlayerInfo[playerid][vVC2] = 0;
                return 
1;
            }
            if(
PlayerInfo[playerid][vVModel])
            {
                
PlayerInfo[playerid][pVVVeh] = CreateVehicle(carid, -144.9922,1117.5718,19.7500,0.8660,0,0,1200);
                
SetVehicleParamsEx(PlayerInfo[playerid][pVVVeh], 0001000);
                
PlayerInfo[playerid][vVVLocked] = 1;
                
PlayerInfo[playerid][vVVModel] = carid;
                
GetVehiclePos(PlayerInfo[playerid][pVVVeh], PlayerInfo[playerid][vVVX], PlayerInfo[playerid][vVVY], PlayerInfo[playerid][vVVZ]);
                
GetVehicleZAngle(PlayerInfo[playerid][pVVVeh], PlayerInfo[playerid][vVVA]);
                
PlayerInfo[playerid][vVVC1] = 0;
                
PlayerInfo[playerid][vVVC2] = 0;
                return 
1;
            }
            
PlayerInfo[playerid][pVeh] = CreateVehicle(carid, -144.9922,1117.5718,19.7500,0.8660,0,0,1200);
            
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0001000);
            
PlayerInfo[playerid][vLocked] = 1;
            
PlayerInfo[playerid][vModel] = carid;
            
GetVehiclePos(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
            
GetVehicleZAngle(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vA]);
            
PlayerInfo[playerid][vC1] = 0;
            
PlayerInfo[playerid][vC2] = 0;
        }
    } 
But when Player have first and second car and want to buy third the car wich the player buys replaces the second car....
Reply
#2

//Sorry, my bad - delete.
Reply
#3

bump
Reply
#4

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)