예제 #1
0
        internal bool OnPlayerInteriorChange(int playerid, int newinteriorid, int oldinteriorid)
        {
            OnPlayerInteriorChanged(GtaPlayer.FindOrCreate(playerid),
                                    new InteriorChangedEventArgs(newinteriorid, oldinteriorid));

            return(true);
        }
예제 #2
0
        internal bool OnPlayerKeyStateChange(int playerid, int newkeys, int oldkeys)
        {
            OnPlayerKeyStateChanged(GtaPlayer.FindOrCreate(playerid),
                                    new KeyStateChangedEventArgs((Keys)newkeys, (Keys)oldkeys));

            return(true);
        }
예제 #3
0
        internal bool OnVehicleDamageStatusUpdate(int vehicleid, int playerid)
        {
            OnVehicleDamageStatusUpdated(GtaVehicle.FindOrCreate(vehicleid),
                                         new PlayerEventArgs(GtaPlayer.FindOrCreate(playerid)));

            return(true);
        }
예제 #4
0
        internal bool OnVehicleStreamOut(int vehicleid, int forplayerid)
        {
            OnVehicleStreamOut(GtaVehicle.FindOrCreate(vehicleid),
                               new PlayerEventArgs(GtaPlayer.FindOrCreate(forplayerid)));

            return(true);
        }
예제 #5
0
        internal bool OnPlayerStateChange(int playerid, int newstate, int oldstate)
        {
            OnPlayerStateChanged(GtaPlayer.FindOrCreate(playerid),
                                 new StateEventArgs((PlayerState)newstate, (PlayerState)oldstate));

            return(true);
        }
예제 #6
0
        internal bool OnVehicleRespray(int playerid, int vehicleid, int color1, int color2)
        {
            OnVehicleResprayed(GtaVehicle.FindOrCreate(vehicleid),
                               new VehicleResprayedEventArgs(GtaPlayer.FindOrCreate(playerid), color1, color2));

            return(true);
        }
예제 #7
0
        internal bool OnEnterExitModShop(int playerid, int enterexit, int interiorid)
        {
            OnPlayerEnterExitModShop(GtaPlayer.FindOrCreate(playerid),
                                     new EnterModShopEventArgs((EnterExit)enterexit, interiorid));

            return(true);
        }
예제 #8
0
        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);
        }
예제 #9
0
        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);
        }
예제 #10
0
        internal bool OnVehiclePaintjob(int playerid, int vehicleid, int paintjobid)
        {
            OnVehiclePaintjobApplied(GtaVehicle.FindOrCreate(vehicleid),
                                     new VehiclePaintjobEventArgs(GtaPlayer.FindOrCreate(playerid), paintjobid));


            return(true);
        }
예제 #11
0
        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);
        }
예제 #12
0
        internal bool OnPlayerRequestSpawn(int playerid)
        {
            var args = new RequestSpawnEventArgs();

            OnPlayerRequestSpawn(GtaPlayer.FindOrCreate(playerid), args);

            return(!args.PreventSpawning);
        }
예제 #13
0
        internal bool OnPlayerRequestClass(int playerid, int classid)
        {
            var args = new RequestClassEventArgs(classid);

            OnPlayerRequestClass(GtaPlayer.FindOrCreate(playerid), args);

            return(!args.PreventSpawning);
        }
예제 #14
0
        internal bool OnPlayerCommandText(int playerid, string cmdtext)
        {
            var args = new CommandTextEventArgs(cmdtext);

            OnPlayerCommandText(GtaPlayer.FindOrCreate(playerid), args);

            return(args.Success);
        }
예제 #15
0
        internal bool OnPlayerUpdate(int playerid)
        {
            var args = new PlayerUpdateEventArgs();

            OnPlayerUpdate(GtaPlayer.FindOrCreate(playerid), args);

            return(!args.PreventPropagation);
        }
예제 #16
0
        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);
        }
예제 #17
0
        internal bool OnPlayerText(int playerid, string text)
        {
            var args = new TextEventArgs(text);

            OnPlayerText(GtaPlayer.FindOrCreate(playerid), args);

            return(args.SendToPlayers);
        }
예제 #18
0
        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);
        }
예제 #19
0
        internal bool OnPlayerSpawn(int playerid)
        {
            var args = new SpawnEventArgs();

            OnPlayerSpawned(GtaPlayer.FindOrCreate(playerid), args);

            return(!args.ReturnToClassSelection);
        }
예제 #20
0
        internal bool OnTrailerUpdate(int playerId, int vehicleId)
        {
            var args = new TrailerEventArgs(GtaPlayer.FindOrCreate(playerId));

            OnTrailerUpdate(GtaVehicle.FindOrCreate(vehicleId), args);

            return(!args.PreventPropagation);
        }
예제 #21
0
        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);
        }
예제 #22
0
        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);
        }
예제 #23
0
        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);
        }
예제 #24
0
        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);
        }
예제 #25
0
        internal bool OnPlayerExitVehicle(int playerid, int vehicleid)
        {
            GtaPlayer player = GtaPlayer.FindOrCreate(playerid);

            OnPlayerExitVehicle(player,
                                new PlayerVehicleEventArgs(player, GtaVehicle.FindOrCreate(vehicleid)));

            return(true);
        }
예제 #26
0
        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);
        }
예제 #27
0
        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);
        }
예제 #28
0
        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);
        }
예제 #29
0
        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);
        }
예제 #30
0
        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);
        }