Ejemplo n.º 1
0
        internal bool OnPlayerInteriorChange(int playerid, int newinteriorid, int oldinteriorid)
        {
            OnPlayerInteriorChanged(GtaPlayer.FindOrCreate(playerid),
                                    new InteriorChangedEventArgs(newinteriorid, oldinteriorid));

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

            return(true);
        }
Ejemplo n.º 3
0
        internal bool OnVehicleDamageStatusUpdate(int vehicleid, int playerid)
        {
            OnVehicleDamageStatusUpdated(GtaVehicle.FindOrCreate(vehicleid),
                                         new PlayerEventArgs(GtaPlayer.FindOrCreate(playerid)));

            return(true);
        }
Ejemplo n.º 4
0
        internal bool OnVehicleStreamOut(int vehicleid, int forplayerid)
        {
            OnVehicleStreamOut(GtaVehicle.FindOrCreate(vehicleid),
                               new PlayerEventArgs(GtaPlayer.FindOrCreate(forplayerid)));

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

            return(true);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 7
0
        internal bool OnEnterExitModShop(int playerid, int enterexit, int interiorid)
        {
            OnPlayerEnterExitModShop(GtaPlayer.FindOrCreate(playerid),
                                     new EnterModShopEventArgs((EnterExit)enterexit, interiorid));

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


            return(true);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 12
0
        internal bool OnPlayerRequestSpawn(int playerid)
        {
            var args = new RequestSpawnEventArgs();

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

            return(!args.PreventSpawning);
        }
Ejemplo n.º 13
0
        internal bool OnPlayerRequestClass(int playerid, int classid)
        {
            var args = new RequestClassEventArgs(classid);

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

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

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

            return(args.Success);
        }
Ejemplo n.º 15
0
        internal bool OnPlayerUpdate(int playerid)
        {
            var args = new PlayerUpdateEventArgs();

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

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

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

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

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

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

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

            return(!args.PreventPropagation);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 25
0
        internal bool OnPlayerExitVehicle(int playerid, int vehicleid)
        {
            GtaPlayer player = GtaPlayer.FindOrCreate(playerid);

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

            return(true);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }