VehiclePos needed
#1

hello guys i made a system with a cmd its about a specific car which we will call it "TestCar" i made a cmd which checks if the car in sf/ls/lv and if the car is in its position in sf and u type the cmd it says that the car is in lv ill show you my cmd with the problem :
PHP код:
CMD:TestCar(playeridparams[])
{
    if(
GetVehiclePos(TestCar, -376.3326, -1427.255925.3829))
    {
        
SendClientMessage(playeridCOLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Grove Street || Nearest Teleport Is (/grove)");
    }
    else if(
GetVehiclePos(TestCar, -940.35852642.058342.3633))
    {
        
SendClientMessage(playeridCOLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Abandoned Air Strip || Nearest Teleport Is (/aa)");
    }
    else if(
GetVehiclePos(TestCar, -2190.0615, -2322.594730.3521))
    {
        
SendClientMessage(playeridCOLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Las Ventures || Nearest Teleport Is (/lv)");
    }
    return 
1;

this is the cmd it gives me 3 argument type mismatch in the if(GetVehiclePos so i need a stock or variable which replaces GetVehiclePos to remove these errors and ty guys sth like VehiclePos i need it to do the function which makes a loop through all 3 places and tell me where is the TestCar Thanks again

Edit: tried using GetVehicleDistanceFromPoint got 3 tag mismatches on the lines which says "Distance(1,2) = " and here is the code
PHP код:
CMD:TestCar(playeridparams[])
{
    new 
DistanceDistance1Distance2;
    
Distance GetVehicleDistanceFromPoint(TestCar, -376.3326, -1427.255925.3829);
    if(
Distance == 0)
    {
        
SendClientMessage(playeridCOLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Grove Street || Nearest Teleport Is (/grove)");
    }
     
Distance1 GetVehicleDistanceFromPoint(TestCar, -940.35852642.058342.3633);
    if(
Distance1 == 0)
    {
        
SendClientMessage(playeridCOLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Grove Street || Nearest Teleport Is (/aa)");
    }
     
Distance2 GetVehicleDistanceFromPoint(TestCar, -2190.0615, -2322.594730.3521);
    if(
Distance2 == 0)
    {
        
SendClientMessage(playeridCOLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Grove Street || Nearest Teleport Is (/aa)");
    }
    return 
1;

tried using float in the distance but get tag mismatch in the if(Distance(1,2) = 0) and by float i mean new floatistance, floatistance1, floatistance2;
so any help is appreciated
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)