- 0
Asellcar + Apark Problems
-
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
YumeDany
Deci la /apark cand urc in masina zice ca nu e comanda .. si cand nu is intr-o si dau /apark zice ca e parcata si etc ...
if(strcmp(cmd, "/apark", true) == 0) { if(IsPlayerConnected(playerid)) { new Float:x,Float:y,Float:z; new Float:a; new carid; carid = GetPlayerVehicleID(playerid); GetPlayerName(playerid, playername, sizeof(playername)); GetVehiclePos(carid, x, y, z); // GetPlayerFacingAngle(playerid, a); GetVehicleZAngle(carid, a); if(PlayerInfo[playerid][pAdmin] >= 1340) { CarInfo[carid][cLocationx] = x; CarInfo[carid][cLocationy] = y; CarInfo[carid][cLocationz] = z; CarInfo[carid][cAngle] = a; format(string, sizeof(string), "~n~ You have parked your car in this location. ~n~"); GameTextForPlayer(playerid, "You have parked this car in this position. It will respawn here.", 10000, 3); OnPropUpdate(); OnPlayerUpdate(playerid); DestroyVehicle(carid); CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000); return 1; } else { SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command !"); return 1; } } return 1; }Iar la /asellcars la fel cand sunt intr-o masina nu merge comanda iar cand nu sunt in masina merge si zice ca am vandut masinaif(!strcmp(cmdtext, "/asellcar", true)) // By Ellis { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first !"); return 1; } if(PlayerInfo[playerid][pAdmin] >= 1337) { new vehid = GetPlayerVehicleID(playerid); new Float:x,Float:y,Float:z; new Float:a; CarInfo[vehid][cOwned] = 0; strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~w~You have admin sold the vehicle", 10000, 3); GetVehiclePos(vehid, x, y, z); GetVehicleZAngle(vehid, a); CarInfo[vehid][cLocationx] = x; CarInfo[vehid][cLocationy] = y; CarInfo[vehid][cLocationz] = z; CarInfo[vehid][cAngle] = a; RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); OnPropUpdate(); DestroyVehicle(vehid); CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle],CarInfo[vehid][cColorOne],CarInfo[vehid][cColorTwo],60000); return 1; } else { SendClientMessage(playerid, COLOR_GREY, " You're not authorized to use that command !"); return 1; } } return 1; }1 answer to this question
Recommended Posts