09.08.2014, 02:18
(
Последний раз редактировалось youssefehab500; 09.08.2014 в 02:50.
)
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 :
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 ![Cheesy](images/smilies/biggrin.png)
Edit: tried using GetVehicleDistanceFromPoint got 3 tag mismatches on the lines which says "Distance(1,2) = " and here is the code
tried using float in the distance but get tag mismatch in the if(Distance(1,2) = 0) and by float i mean new float
istance, float
istance1, float
istance2;
so any help is appreciated
PHP код:
CMD:TestCar(playerid, params[])
{
if(GetVehiclePos(TestCar, -376.3326, -1427.2559, 25.3829))
{
SendClientMessage(playerid, COLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Grove Street || Nearest Teleport Is (/grove)");
}
else if(GetVehiclePos(TestCar, -940.3585, 2642.0583, 42.3633))
{
SendClientMessage(playerid, COLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Abandoned Air Strip || Nearest Teleport Is (/aa)");
}
else if(GetVehiclePos(TestCar, -2190.0615, -2322.5947, 30.3521))
{
SendClientMessage(playerid, COLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Las Ventures || Nearest Teleport Is (/lv)");
}
return 1;
}
![Cheesy](images/smilies/biggrin.png)
Edit: tried using GetVehicleDistanceFromPoint got 3 tag mismatches on the lines which says "Distance(1,2) = " and here is the code
PHP код:
CMD:TestCar(playerid, params[])
{
new Distance, Distance1, Distance2;
Distance = GetVehicleDistanceFromPoint(TestCar, -376.3326, -1427.2559, 25.3829);
if(Distance == 0)
{
SendClientMessage(playerid, COLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Grove Street || Nearest Teleport Is (/grove)");
}
Distance1 = GetVehicleDistanceFromPoint(TestCar, -940.3585, 2642.0583, 42.3633);
if(Distance1 == 0)
{
SendClientMessage(playerid, COLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Grove Street || Nearest Teleport Is (/aa)");
}
Distance2 = GetVehicleDistanceFromPoint(TestCar, -2190.0615, -2322.5947, 30.3521);
if(Distance2 == 0)
{
SendClientMessage(playerid, COLOR_RED,"{FFFF00}[SERVER]: {FFFFFF}The TestCar Is In Grove Street || Nearest Teleport Is (/aa)");
}
return 1;
}
![Cheesy](images/smilies/biggrin.png)
![Cheesy](images/smilies/biggrin.png)
![Cheesy](images/smilies/biggrin.png)
so any help is appreciated