This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import time | |
from dbus import SystemBus, Interface | |
from dbus.mainloop.glib import DBusGMainLoop, threads_init | |
from gi.repository import GLib | |
UDISKS2_SERVICE = 'org.freedesktop.UDisks2' | |
BLOCK_INTERFACE = f'{UDISKS2_SERVICE}.Block' | |
FILESYSTEM_INTERFACE = f'{UDISKS2_SERVICE}.Filesystem' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass, field | |
from typing import Callable, List | |
from samp import ( | |
INVALID_TEXT_DRAW, | |
CancelSelectTextDraw, | |
CreatePlayerTextDraw, | |
GetTickCount, | |
IsPlayerConnected, | |
PlayerTextDrawAlignment, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
import types | |
import samp | |
t_unauthorized = 'You are not allowed to use this command' | |
t_unauthd_color = 0xFF1111FF | |
_cmd_list = dict() | |
current_cmd = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
import time | |
import trio | |
from kivy.app import App | |
from kivy.clock import Clock | |
from kivy.lang import Builder | |
from kivy.properties import NumericProperty | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from samp import ( | |
MAX_PLAYERS, | |
GetPlayerName, | |
GetPlayerScore, | |
IsPlayerConnected, | |
KillTimer, | |
SendClientMessage, | |
SetPlayerScore, | |
SetTimer, | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
component_type_names = [ | |
'Spoiler', | |
'Hood', | |
'Roof', | |
'Sideskirt', | |
'Lamps', | |
'Nitro', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
from typing import Dict, List | |
from .component_data import Component, components | |
@dataclass | |
class Vehicle: | |
id: int | |
name: str |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
from dataclasses import dataclass, field | |
from typing import Any, Callable, Protocol | |
from samp import SendClientMessage # type: ignore | |
class CommandHandler(Protocol): | |
def __call__(self, playerid: int, *args: str) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN \ | |
apt-get update && \ | |
apt-get install -y \ | |
gpg \ | |
wget \ | |
&& \ | |
wget -O- https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \ | |
gpg --dearmor - | \ | |
tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from dataclasses import dataclass, field | |
from typing import ClassVar, Dict, List, Optional, Tuple | |
from samp import ( | |
PLAYER_STATE_DRIVER, | |
PLAYER_STATE_ONFOOT, | |
AddVehicleComponent, | |
CallRemoteFunction, | |
ChangeVehicleColor, |