Skip to content

Instantly share code, notes, and snippets.

View gsmj's full-sized avatar
👋
sometimes working, sometimes doing nothing.

Dan gsmj

👋
sometimes working, sometimes doing nothing.
  • Russia
View GitHub Profile
@gsmj
gsmj / bmembers.lua
Last active January 25, 2025 17:13
Better members (Samp-Rp.Ru)
local script = "Better members"
local author = "gsmj"
local version = "v1.0.0"
script_name(script)
script_author(author)
script_version(version)
require ("lib.moonloader")
local sampev = require("lib.samp.events")
@gsmj
gsmj / eselection.py
Last active January 25, 2025 22:58
Rewritten eselection.py module in PySAMP 2.1 style. Original: https://gist.github.com/Cheaterman/4b54af8eb62ff94b79af3b8ecf8fc7f1
from dataclasses import dataclass, field
from typing import Callable
from pysamp import (
cancel_select_text_draw,
get_tick_count,
select_text_draw,
)
from pysamp.textdraw import TextDraw
from pysamp.player import Player
@gsmj
gsmj / prox_detector.py
Created January 9, 2025 00:10
Prox detector in Python (by ziggi)
from pysamp.player import Player as BasePlayer
class Player(BasePlayer):
registry: dict[int, BasePlayer] = {}
def __init__(self, player_id: int):
super().__init__(player_id)
@classmethod
def from_registry_native(cls, player: BasePlayer | int) -> "Player":
@gsmj
gsmj / map_zones.py
Last active January 16, 2025 12:35
map_zones.inc in Python
import math
from dataclasses import dataclass
from enum import Enum, auto
from typing import Optional
from pysamp.player import Player
from pysamp.vehicle import Vehicle
EXCLUDED_MAP_AREA_COUNT: int = 9
MAX_MAP_AREAS: int = 13
@gsmj
gsmj / preload.py
Created November 23, 2024 16:40
preloadanimlib in python (pysamp)
from pysamp import apply_animation
animation_list: list[str] = [
"AIRPORT", "ATTRACTORS", "BAR", "BASEBALL", "BD_FIRE",
"BEACH", "BENCHPRESS", "BF_INJECTION", "BIKE_DBZ", "BIKED",
"BIKEH", "BIKELEAP", "BIKES", "BIKEV", "BLOWJOBZ",
"BMX", "BOMBER", "BOX", "BSKTBALL", "BUDDY",
"BUS", "CAMERA", "CAR", "CAR_CHAT", "CARRY",
"CASINO", "CHAINSAW", "CHOPPA", "CLOTHES", "COACH",
"COLT45", "COP_AMBIENT", "COP_DVBYZ", "CRACK", "CRIB",