Jump to content
  • 0

Problema /park Vehicule Personale


Question

Posted

Problemă întâlnită (descriere):Am un gm care detine un script de vehicule personale de tip [ poti detine 1 masina , 1 motto , 1 barca, 1 avion(heli) ] dar cand dau /parcheaza [asa este trecut in gm] nu se salveaza , arata "NUME SERVER : Masina ta va fi spawnata aici de acum in colo ! "

dar nu se salveaza..
Ero(area / rile) / warning-(ul / urile): 0 ,0
Liniile de cod / sursa / script-ul:

[pawn]//-----------------------------------------Comanda-----------------------------------------//
if(strcmp(cmd, "/parcheaza", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:x,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
if(GetPlayerVehicleID(playerid) == PlayerData[playerid][pPcarkey]+PreVehicle)
{
carid = PlayerData[playerid][pPcarkey];
}
else if(GetPlayerVehicleID(playerid) == PlayerData[playerid][pPcarkey2]+PreVehicle)
{
carid = PlayerData[playerid][pPcarkey2];
}
else if(GetPlayerVehicleID(playerid) == PlayerData[playerid][pPcarkey3]+PreVehicle)
{
carid = PlayerData[playerid][pPcarkey3];
}
else { return 1; }
getcarid = GetPlayerVehicleID(playerid)-PreVehicle;
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid+PreVehicle, x, y, z);
GetVehicleZAngle(carid+PreVehicle, a);
if(IsPlayerInVehicle(playerid,carid+PreVehicle) && CarData[carid][cOwned] == 1)
{
if(PlayerData[playerid][pPcarkey] == 999 && PlayerData[playerid][pPcarkey2] == 999 && PlayerData[playerid][pPcarkey3] == 999)
{
SendClientMessage(playerid, COLOR_GREY, "Nu detii o masina personala.");
return 1;
}
if(getcarid == carid)
{
CarData[carid][cLocationx] = x;
CarData[carid][cLocationy] = y;
CarData[carid][cLocationz] = z;
CarData[carid][cAngle] = a;
SendClientMessage(playerid, COLOR_GRAD2, "Ai parcat masina personala aici!");
SendClientMessage(playerid, COLOR_GRAD2, "De acum masina ta se va respama aici!");
DestroyVehicle(carid+PreVehicle);
CreateVehicle(CarData[carid][cModel],CarData[carid][cLocationx],CarData[carid][cLocationy],CarData[carid][cLocationz]+1.0,CarData[carid][cAngle],CarData[carid][cColorOne],CarData[carid][cColorTwo],60000);
TogglePlayerControllable(playerid, 1);
format(string, sizeof(string), "%s",CarData[carid][cNum]);
SetVehicleNumberPlate(carid+PreVehicle, string);
format(string, sizeof(string), "UPDATE cars SET Locationx='%f' WHERE id=%d", CarData[carid][cLocationx], carid);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Locationy='%f' WHERE id=%d", CarData[carid][cLocationy], carid);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Locationz='%f' WHERE id=%d", CarData[carid][cLocationz], carid);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Angle='%f' WHERE id=%d", CarData[carid][cAngle], carid);
mysql_query(string);
return 1;
}
}
}
}
[/pawn]
Imagini / Video (optional): Nu am 
Aţi încercat să rezolvaţi singur?: pana acuma rezolvam aceasta problema cu /aparcheaza [admin only] ... dar doresc daca se poate sa ma ajutati sa fac /park masina , /park motto , /park barca , /park heli

Nu am reusit pana acuma din lipsa de experienta , multumesc celor care ma pot ajuta !

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.