Problem | /carpark
#1

When i am using my command on ma' server /carpark it's says the positions X Y Z
but the car despired,What i have to do to fix it?
Code:
if(strcmp(cmd,"/parkcar",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new car = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(IsAnOwnableCar(car))
{
if(PlayerInfo[playerid][pCarKey] == car || PlayerInfo[playerid][pAdmin] >= 10)
{
new Float: X, Float: Y, Float: Z, Float: A;
new Float: pX, Float: pY, Float: pZ;
GetPlayerPos(playerid,pX,pY,pZ);
GetVehiclePos(car,X,Y,Z);
GetVehicleZAngle(car,A);
CarInfo[car][cX] = X;
CarInfo[car][cY] = Y;
CarInfo[car][cZ] = Z;
CarInfo[car][cA] = A;
DestroyVehicle(car);
CreateVehicle(CarInfo[car][cModel],CarInfo[car][cX],CarInfo[car][cY],CarInfo[car][cZ],CarInfo[car][cA],CarInfo[car][cColor1],CarInfo[car][cColor2],600);
format(string,sizeof(string),".: Info: You have successfully parked your car at postions: X = %.1f Y = %.1f Z = %.1f :.",X,Y,Z);
SendClientMessage(playerid,COLOR_LIME,string);
SetPlayerPos(playerid,pX,pY+4,pZ);
SaveCars();
return 1;
} else SendClientMessage(playerid,COLOR_ERROR,".: Error: You dont own this car :.");
} else SendClientMessage(playerid,COLOR_ERROR,".: Error: You cannot park this car :.");
} else SendClientMessage(playerid,COLOR_ERROR,".: Error: You are not in any vehicle :.");
}
return 1;
}



What's the problem ?Please help..
Reply
#2

What edit?
Reply
#3

I will help you a little bit to tele with you the car
pawn Код:
GetVehiclePos(vehicleid, x, y, z);
SetVehiclePos(vehicleid, x, y, z);
Now go script it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)