Some Help please! -
XHunterZ - 17.08.2016
Hello guys i need 2 help the first is plugin one i dont know what is the plugin is or idk where is the updated one.
the problem is when someone /q id 0 tps in blueberry.
the 2nd problem is i want when i /park my car save the position i cant script it to save the virtual world and interior as i have created garage system, i tried alot of ways but got bugs.
Thanks.
Re: Some Help please! -
XHunterZ - 18.08.2016
i tried saving the world with car postion and color in its .db but it says tag mismatch
idk why :/
Re: Some Help please! -
DeeadPool - 18.08.2016
Can you share the /park script so that i can help you?
Re: Some Help please! -
XHunterZ - 19.08.2016
sure here
Код:
COMMAND:park(playerid, params[])
{
if (playerData[playerid][playerLoggedIn])
{
if (IsPlayerInAnyVehicle(playerid))
{
new
vid = GetPlayerVehicleID(playerid),
query[400]
;
for(new i; i < MAX_SAVED_VEHICLES; i++)
{
if (vid != VehicleInfo[i][vehicleID]) continue;
if(VehicleInfo[i][vOwner] != playerData[playerid][actualID] && playerData[playerid][playerLevel] < 3)
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You cannot park another player's vehicle.");
}
else
{
new
vehicle,
Float:x,
Float:y,
Float:z,
Float:za,
world,
Float:a
;
vehicle = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicle, x, y, z);
new vehicleid = GetPlayerVehicleID(playerid);
world = GetVehicleVirtualWorld(vehicleid);
GetVehicleZAngle(vehicle, za);
GetPlayerFacingAngle(playerid, a);
VehicleInfo[i][vX] = x;
VehicleInfo[i][vY] = y;
VehicleInfo[i][vZ] = z;
VehicleInfo[i][vWorld] = world;
VehicleInfo[i][vAngle] = za;
format(query, sizeof(query), "UPDATE `vehicles` SET `x` = '%f', `y` = '%f', `z` = '%f', `world` = '%i', `angle` = '%f' WHERE `id` = '%i'", x, y, z,world, za, i);
SendClientMessage(playerid, COLOR_WHITE, "{58D3F7}[VEHICLE] {FFFFFF}Your vehicle will spawn here in future.");
new debugmsg[200];
format(debugmsg, sizeof(debugmsg), "Tried to park DB ID: %i", i);
print(debugmsg);
db_query(DB: VEHICLESDB, query);
}
break;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You must be inside a vehicle to use this command.");
}
}
Re: Some Help please! -
Jabern - 19.08.2016
Problem one :
- Can you show me the : OnPlayerDisconnect ?
Problem two :
in you'r query try to change the
with
Re: Some Help please! -
DeeadPool - 19.08.2016
This Should work :- (it's untested)
Код:
COMMAND:park(playerid, params[])
{
if (playerData[playerid][playerLoggedIn])
{
if (IsPlayerInAnyVehicle(playerid))
{
new
vid = GetPlayerVehicleID(playerid),
query[400]
;
for(new i; i < MAX_SAVED_VEHICLES; i++)
{
if (vid != VehicleInfo[i][vehicleID]) continue;
if(VehicleInfo[i][vOwner] != playerData[playerid][actualID] && playerData[playerid][playerLevel] < 3)
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You cannot park another player's vehicle.");
}
else
{
new
vehicle,
Float:x,
Float:y,
Float:z,
Float:za,
Float:a
;
vehicle = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicle, x, y, z);
new world = GetVehicleVirtualWorld(vehicle);
GetVehicleZAngle(vehicle, za);
GetPlayerFacingAngle(playerid, a);
VehicleInfo[i][vX] = x;
VehicleInfo[i][vY] = y;
VehicleInfo[i][vZ] = z;
VehicleInfo[i][vWorld] = world;
VehicleInfo[i][vAngle] = za;
format(query, sizeof(query), "UPDATE `vehicles` SET `x` = '%f', `y` = '%f', `z` = '%f', `world` = '%i', `angle` = '%f' WHERE `id` = '%i'", x, y, z,world, za, i);
SendClientMessage(playerid, COLOR_WHITE, "{58D3F7}[VEHICLE] {FFFFFF}Your vehicle will spawn here in future.");
new debugmsg[200];
format(debugmsg, sizeof(debugmsg), "Tried to park DB ID: %d", i);
print(debugmsg);
db_query(DB: VEHICLESDB, query);
}
break;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You must be inside a vehicle to use this command.");
}
}
if it doesn't work, pm me you variables and enumators you are using. so that i can understand a bit more and resolve your problem.