internal bool OnPlayerInteriorChange(int playerid, int newinteriorid, int oldinteriorid) { OnPlayerInteriorChanged(GtaPlayer.FindOrCreate(playerid), new InteriorChangedEventArgs(newinteriorid, oldinteriorid)); return(true); }
internal bool OnPlayerKeyStateChange(int playerid, int newkeys, int oldkeys) { OnPlayerKeyStateChanged(GtaPlayer.FindOrCreate(playerid), new KeyStateChangedEventArgs((Keys)newkeys, (Keys)oldkeys)); return(true); }
internal bool OnVehicleDamageStatusUpdate(int vehicleid, int playerid) { OnVehicleDamageStatusUpdated(GtaVehicle.FindOrCreate(vehicleid), new PlayerEventArgs(GtaPlayer.FindOrCreate(playerid))); return(true); }
internal bool OnVehicleStreamOut(int vehicleid, int forplayerid) { OnVehicleStreamOut(GtaVehicle.FindOrCreate(vehicleid), new PlayerEventArgs(GtaPlayer.FindOrCreate(forplayerid))); return(true); }
internal bool OnPlayerStateChange(int playerid, int newstate, int oldstate) { OnPlayerStateChanged(GtaPlayer.FindOrCreate(playerid), new StateEventArgs((PlayerState)newstate, (PlayerState)oldstate)); return(true); }
internal bool OnVehicleRespray(int playerid, int vehicleid, int color1, int color2) { OnVehicleResprayed(GtaVehicle.FindOrCreate(vehicleid), new VehicleResprayedEventArgs(GtaPlayer.FindOrCreate(playerid), color1, color2)); return(true); }
internal bool OnEnterExitModShop(int playerid, int enterexit, int interiorid) { OnPlayerEnterExitModShop(GtaPlayer.FindOrCreate(playerid), new EnterModShopEventArgs((EnterExit)enterexit, interiorid)); return(true); }
internal bool OnDialogResponse(int playerid, int dialogid, int response, int listitem, string inputtext) { OnDialogResponse(GtaPlayer.FindOrCreate(playerid), new DialogResponseEventArgs(GtaPlayer.FindOrCreate(playerid), dialogid, response, listitem, inputtext)); return(true); }
internal bool OnPlayerGiveDamageActor(int playerid, int damagedActorid, float amount, int weaponid, int bodypart) { OnPlayerGiveDamageActor(Actor.FindOrCreate(damagedActorid), new DamageEventArgs(GtaPlayer.FindOrCreate(playerid), amount, (Weapon)weaponid, (BodyPart)bodypart)); return(true); }
internal bool OnVehiclePaintjob(int playerid, int vehicleid, int paintjobid) { OnVehiclePaintjobApplied(GtaVehicle.FindOrCreate(vehicleid), new VehiclePaintjobEventArgs(GtaPlayer.FindOrCreate(playerid), paintjobid)); return(true); }
internal bool OnVehicleMod(int playerid, int vehicleid, int componentid) { var args = new VehicleModEventArgs(GtaPlayer.FindOrCreate(playerid), componentid); OnVehicleMod(GtaVehicle.FindOrCreate(vehicleid), args); return(!args.PreventPropagation); }
internal bool OnPlayerRequestSpawn(int playerid) { var args = new RequestSpawnEventArgs(); OnPlayerRequestSpawn(GtaPlayer.FindOrCreate(playerid), args); return(!args.PreventSpawning); }
internal bool OnPlayerRequestClass(int playerid, int classid) { var args = new RequestClassEventArgs(classid); OnPlayerRequestClass(GtaPlayer.FindOrCreate(playerid), args); return(!args.PreventSpawning); }
internal bool OnPlayerCommandText(int playerid, string cmdtext) { var args = new CommandTextEventArgs(cmdtext); OnPlayerCommandText(GtaPlayer.FindOrCreate(playerid), args); return(args.Success); }
internal bool OnPlayerUpdate(int playerid) { var args = new PlayerUpdateEventArgs(); OnPlayerUpdate(GtaPlayer.FindOrCreate(playerid), args); return(!args.PreventPropagation); }
internal bool OnPlayerDeath(int playerid, int killerid, int reason) { OnPlayerDied(GtaPlayer.FindOrCreate(playerid), new DeathEventArgs(killerid == GtaPlayer.InvalidId ? null : GtaPlayer.FindOrCreate(killerid), (Weapon)reason)); return(true); }
internal bool OnPlayerText(int playerid, string text) { var args = new TextEventArgs(text); OnPlayerText(GtaPlayer.FindOrCreate(playerid), args); return(args.SendToPlayers); }
internal bool OnPlayerGiveDamage(int playerid, int damagedid, float amount, int weaponid, int bodypart) { OnPlayerGiveDamage(GtaPlayer.FindOrCreate(playerid), new DamageEventArgs(damagedid == GtaPlayer.InvalidId ? null : GtaPlayer.FindOrCreate(damagedid), amount, (Weapon)weaponid, (BodyPart)bodypart)); return(true); }
internal bool OnPlayerSpawn(int playerid) { var args = new SpawnEventArgs(); OnPlayerSpawned(GtaPlayer.FindOrCreate(playerid), args); return(!args.ReturnToClassSelection); }
internal bool OnTrailerUpdate(int playerId, int vehicleId) { var args = new TrailerEventArgs(GtaPlayer.FindOrCreate(playerId)); OnTrailerUpdate(GtaVehicle.FindOrCreate(vehicleId), args); return(!args.PreventPropagation); }
internal bool OnPlayerDisconnect(int playerid, int reason) { var args = new DisconnectEventArgs((DisconnectReason)reason); OnPlayerDisconnected(GtaPlayer.FindOrCreate(playerid), args); OnPlayerCleanup(GtaPlayer.FindOrCreate(playerid), args); return(true); }
internal bool OnPlayerEnterVehicle(int playerid, int vehicleid, bool ispassenger) { GtaPlayer player = GtaPlayer.FindOrCreate(playerid); OnPlayerEnterVehicle(player, new EnterVehicleEventArgs(player, GtaVehicle.FindOrCreate(vehicleid), ispassenger)); return(true); }
internal bool OnPlayerWeaponShot(int playerid, int weaponid, int hittype, int hitid, float fX, float fY, float fZ) { var args = new WeaponShotEventArgs((Weapon)weaponid, (BulletHitType)hittype, hitid, new Vector3(fX, fY, fZ)); OnPlayerWeaponShot(GtaPlayer.FindOrCreate(playerid), args); return(!args.PreventDamage); }
internal bool OnPlayerClickPlayer(int playerid, int clickedplayerid, int source) { OnPlayerClickPlayer(GtaPlayer.FindOrCreate(playerid), new ClickPlayerEventArgs( clickedplayerid == GtaPlayer.InvalidId ? null : GtaPlayer.FindOrCreate(clickedplayerid), (PlayerClickSource)source)); return(true); }
internal bool OnPlayerExitVehicle(int playerid, int vehicleid) { GtaPlayer player = GtaPlayer.FindOrCreate(playerid); OnPlayerExitVehicle(player, new PlayerVehicleEventArgs(player, GtaVehicle.FindOrCreate(vehicleid))); return(true); }
internal bool OnPlayerClickTextDraw(int playerid, int clickedid) { GtaPlayer player = GtaPlayer.FindOrCreate(playerid); OnPlayerClickTextDraw(player, new ClickTextDrawEventArgs(player, clickedid == TextDraw.InvalidId ? null : TextDraw.FindOrCreate(clickedid))); return(true); }
internal bool OnUnoccupiedVehicleUpdate(int vehicleid, int playerid, int passengerSeat, float newX, float newY, float newZ, float velX, float velY, float velZ) { var args = new UnoccupiedVehicleEventArgs(GtaPlayer.FindOrCreate(playerid), passengerSeat, new Vector3(newX, newY, newZ), new Vector3(velX, velY, velZ)); OnUnoccupiedVehicleUpdated(GtaVehicle.FindOrCreate(vehicleid), args); return(!args.PreventPropagation); }
internal bool OnPlayerEditAttachedObject(int playerid, int response, int index, int modelid, int boneid, float fOffsetX, float fOffsetY, float fOffsetZ, float fRotX, float fRotY, float fRotZ, float fScaleX, float fScaleY, float fScaleZ) { OnPlayerEditAttachedObject(GtaPlayer.FindOrCreate(playerid), new EditAttachedObjectEventArgs((EditObjectResponse)response, index, modelid, (Bone)boneid, new Vector3(fOffsetX, fOffsetY, fOffsetZ), new Vector3(fRotX, fRotY, fRotZ), new Vector3(fScaleX, fScaleY, fScaleZ))); return(true); }
internal bool OnPlayerClickPlayerTextDraw(int playerid, int playertextid) { GtaPlayer player = GtaPlayer.FindOrCreate(playerid); OnPlayerClickPlayerTextDraw(player, new ClickPlayerTextDrawEventArgs(player, playertextid == PlayerTextDraw.InvalidId ? null : PlayerTextDraw.FindOrCreate(player, playertextid))); return(true); }
internal bool OnPlayerEditObject(int playerid, bool playerobject, int objectid, int response, float fX, float fY, float fZ, float fRotX, float fRotY, float fRotZ) { GtaPlayer player = GtaPlayer.FindOrCreate(playerid); if (playerobject) { OnPlayerEditPlayerObject(player, new EditPlayerObjectEventArgs(player, PlayerObject.FindOrCreate(player, objectid), (EditObjectResponse)response, new Vector3(fX, fY, fZ), new Vector3(fRotX, fRotY, fRotZ))); } else { OnPlayerEditGlobalObject(player, new EditGlobalObjectEventArgs(player, GlobalObject.FindOrCreate(objectid), (EditObjectResponse)response, new Vector3(fX, fY, fZ), new Vector3(fRotX, fRotY, fRotZ))); } return(true); }