25.04.2013, 19:04
Ravens / edit Roleplay I have a problem with a car buy a car and restart server in my stats is either a mountain bike or go to one of the vehicles of some organizations but mostly mountain bike ..... If anyone knows a solution, says .... Thanks....Sorry for low english
Код:
//--------CAR_OWNERSHIP_COMMANDS-------------------------------------------- CMD:vehiclehelp(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pCarKey] != 9999 || PlayerInfo[playerid][pCarKey2] != 9999) { new string[128],sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername,sizeof(sendername)); SCM(playerid, COLOR_GREEN,"________________Vehicle Help________________"); SCM(playerid, COLOR_GRAD2,"*** VEHICLE *** /v [name] /findcar /carcode"); SCM(playerid, COLOR_GRAD3,"*** VEHICLE *** Available names: park, lock, sell, sellto, color, find"); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /vehiclehelp",d,m,y,h,mi,s,sendername); CommandLog(string); return 1; } else { SCM(playerid,COLOR_GRAD2,"** You do not currently own a car! **"); return 1; } } return 1; } CMD:apark(playerid, params[]) { if(IsPlayerConnected(playerid)) { new Float:x,Float:y,Float:z; new Float:a,string[128]; new carid = GetPlayerVehicleID(playerid); GetVehiclePos(carid, x, y, z); GetVehicleZAngle(carid, a); if(PlayerInfo[playerid][Admin] >= 5) { if(IsAnOwnableCar(carid)) { CarInfo[carid][cLocationx] = x; CarInfo[carid][cLocationy] = y; CarInfo[carid][cLocationz] = z; CarInfo[carid][cAngle] = a; format(string, sizeof(string), "~n~ Parkirali ste vozilo na ovoj poziciji. ~n~"); GameTextForPlayer(playerid, "Parkirali ste ova kola na ovoj poziciji. Ovde ce se respawnovati.", 10000, 3); OnPropUpdate(4,carid); OnPlayerUpdateEx(playerid); DestroyVehicle(carid); ownedcar[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); if(CarInfo[carid][cPaintjob] != 999) { ChangeVehiclePaintjob(carid, CarInfo[carid][cPaintjob]); } SetVehicleVirtualWorld(carid, CarInfo[carid][cVirWorld]); SetVehicleModifications(carid); LegalGetIn[playerid] = 1; PutPlayerInVehicle(playerid, carid, 0); return 1; } else { SCM(playerid, COLOR_GREY, "* Ovo mozete uraditi samo sa kolima koja su na /v!"); return 1; } } else { SCM(playerid, COLOR_GREY, "* Niste ovlasceni da koristite ovu komandu!"); return 1; } } return 1; } CMD:park(playerid, params[]) { if(IsPlayerConnected(playerid)) { new Float:x,Float:y,Float:z; new Float:a,string[128]; new carid = GetPlayerVehicleID(playerid); GetVehiclePos(carid, x, y, z); GetVehicleZAngle(carid, a); if(PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17) { if(IsPlayerInRangeOfPoint(playerid, 70,1251.7888,-1818.8201,13.4089)) { if(IsAnOwnableCar(carid)) { CarInfo[carid][cLocationx] = x; CarInfo[carid][cLocationy] = y; CarInfo[carid][cLocationz] = z; CarInfo[carid][cAngle] = a; CarInfo[carid][cKazna] = 1; engineOn[carid] = 0; gEngine[playerid] = 0; format(string, sizeof(string), "~n~ Parkirali ste vozilo na ovoj poziciji. ~n~"); GameTextForPlayer(playerid, "Parkirali ste ova kola na ovoj poziciji. Ovde ce se respawnovati.", 10000, 3); OnPropUpdate(4,carid); OnPlayerUpdateEx(playerid); DestroyVehicle(carid); ownedcar[carid] = AddStaticVehicleEx(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000); if(CarInfo[carid][cPaintjob] != 999) { ChangeVehiclePaintjob(carid, CarInfo[carid][cPaintjob]); } SetVehicleVirtualWorld(carid, CarInfo[carid][cVirWorld]); SetVehicleModifications(carid); return 1; } else { SCM(playerid, COLOR_GREY, "* Ovo mozete uraditi samo sa kolima koja su na /v!"); return 1; } } else { SCM(playerid, COLOR_GREY, "* Niste u parking servis bazi!"); return 1; } } else { SCM(playerid, COLOR_GREY, "* Niste ovlasceni da koristite ovu komandu!"); return 1; } } return 1; } //--------END_CAR_OWNERSHIP_COMMANDS----------------------------------------