13.08.2012, 15:27
Hello!
I found a code: https://sampforum.blast.hk/showthread.php?tid=100318&page=2
But I do not work.
The Code:
and
Stock:
My version: 0.3e R2
Ideas?
I'm sorry, I'm Hungarian ...
I found a code: https://sampforum.blast.hk/showthread.php?tid=100318&page=2
But I do not work.
The Code:
Код:
CMD:lefoglal(playerid, params[]) { if(!IsPlayerInAnyVehicle(playerid)) return HU(playerid, COLOR_RED, "Mit akarsz lefoglani, ьlj jбrműbe!"); if(PlayerInfo[playerid][pLeader] != 7 && PlayerInfo[playerid][pMember]!=7) return HU(playerid, COLOR_RED, "Nem vagy szerelő!"); if(!IsPlayerInRangeOfPoint(playerid,5,1341.7781,332.7757,20.0897)) return HU(playerid, COLOR_RED, "Nem vagy a garбzsnбl!"); if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return HU(playerid, COLOR_RED, "Nem vontatsz semmit!"); new trailer = GetVehicleTrailer(GetPlayerVehicleID(playerid)); if(OwnedVeh(trailer) == 0) return HU(playerid, COLOR_RED, "Ezt nem foglalhatod le!"); SetVehicleAndTrailerPos(playerid, -1714.6294,983.9791,17.4628,271.0273,-1714.6294,983.9791,17.4628,271.0273); SendClientMessage(playerid, SZURKE, "Most rakd le valahova a kocsit, RP-sen!!! ((/lerak))"); garazsba[playerid] = 1; return 1; }
Код:
CMD:kihoz(playerid) { if(!IsPlayerInAnyVehicle(playerid)) return HU(playerid, COLOR_RED, "Mit akarsz kihozni, ьlj jбrműbe!"); if(PlayerInfo[playerid][pLeader] != 7 && PlayerInfo[playerid][pMember]!=7) return HU(playerid, COLOR_RED, "Nem vagy szerelő!"); if(garazsba[playerid] != 1) return HU(playerid, COLOR_RED, "Nem vagy a garбzsban!"); if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return HU(playerid, COLOR_RED, "Nem vontatsz semmit!"); new trailer = GetVehicleTrailer(GetPlayerVehicleID(playerid)); /*new ivID = GetPlayerVehicleID(playerid);*/ if(OwnedVeh(trailer) != 0) { SetVehicleAndTrailerPos(playerid, 1339.1809,336.8199,19.5024,336.1941,1339.1809,336.8199,19.5024,336.1941); //SetTimerEx("Foglal2",500,0,"ii",trailer,ivID); SendClientMessage(playerid, NZOLD, "Jбrmű kihozva! Most vidd el az autуkereskedйshez, йs parkold le! (( /klerak! ))"); } else return HU(playerid, COLOR_RED, "Ezt nem hozhatod ki!"); return 1; }
Код:
stock SetVehicleAndTrailerPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa) { if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command."); SetVehiclePos(GetPlayerVehicleID(playerid), Float:Vx, Float:Vy, Float:Vz); SetVehicleZAngle(GetPlayerVehicleID(playerid),Float:Va); SetCameraBehindPlayer(playerid); SetVehiclePos(GetVehicleTrailer(GetPlayerVehicleID(playerid)), Float:Vx, Float:Vy, Float:Vz); SetVehicleZAngle(GetVehicleTrailer(GetPlayerVehicleID(playerid)), Float:Va); } else { SetPlayerPos(playerid, Float:Px, Float:Py, Float:Pz); SetPlayerFacingAngle(playerid, Float:Pa); SetCameraBehindPlayer(playerid); } return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { AttachTrailerToVehicle(GetVehicleTrailer(GetPlayerVehicleID(forplayerid)),GetPlayerVehicleID(forplayerid)); }
Ideas?
I'm sorry, I'm Hungarian ...