- 0
Despawn clan vehicle
-
Similar Content
-
- 5 answers
- 862 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
TheGodfather
Salut, cand folosesc /cpark, vreau ca masina in care sunt sa se despawneze la finalul comenzii. Dar nu se distruge corect acel clobject care este un tag, lipit pe masina ca un fel de vip name. Mai jos las comanda si o parte de cod unde se despawneaza corect masina, stergand corect si acel tag, pentru ca daca spawnez alta masina cu comanda care e acum, o sa apara tagul aiurea pe alta masina.
YCMD:cpark(playerid, params[], help) {
new Float:X, Float:Y, Float:Z, Float:Angle, clanid = ClanVehicle[playerid];
GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z); GetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
SetVehiclePos(ClanVehicleInfo[GetPlayerVehicleID(playerid)][clVehInGame], X, Y, Z); SetVehicleZAngle(ClanVehicleInfo[GetPlayerVehicleID(playerid)][clVehInGame], Angle);
ClanVehicleInfo[clanid][clX] = X, ClanVehicleInfo[clanid][clY] = Y, ClanVehicleInfo[clanid][clZ] = Z, ClanVehicleInfo[clanid][clAngle] = Angle;
SetCameraBehindPlayer(playerid);
gQuery[0] = EOS; mysql_format( SQL, gQuery, sizeof gQuery, "UPDATE `clanvehicles` SET `X`='%f', `Y`='%f', `Z`='%f', `Angle`='%f' WHERE `ID`='%d'", X, Y, Z, Angle, ClanVehicleInfo[ClanVehicle[playerid]][clID]);
mysql_tquery( SQL, gQuery, "", "" );
DestroyObject(ClanVehicleInfo[ClanVehicle[playerid]][clObject]);
ClanVehicleInfo[ClanVehicle[playerid]][clVehInGame] = 0;
DestroyVehicle(GetPlayerVehicleID(playerid));
return true;
}
case DIALOG_CLANVEHICLES+210: {
if(!response) return true;
new i = SelectedHud[ playerid ];
switch(listitem) {
case 0: {
if(ClanVehicleInfo[i][clVehInGame] != 0) {
SCM(playerid, -1, "Clan vehicle despawned!");
DestroyVehicle(ClanVehicleInfo[i][clVehInGame]);
DestroyObject(ClanVehicleInfo[i][clObject]);
ClanVehicleInfo[i][clVehInGame] = 0;
}
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now