MichaelBelgium / Misc

Small and maybe useful things for a SA:MP Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Misc

Small and maybe useful things for a SA:MP Server

OnPlayerVehicleHealthChange (OPVH.pwn)

public OnPlayerVehicleHealthChange(playerid, vehicleid, Float:newhealth, Float:oldhealth);

Example

```PAWN public OnPlayerVehicleHealthChange(playerid, vehicleid, Float:newhealth, Float:oldhealth) { if(newhealth > oldhealth) BanEx(playerid,"Healthhack"); return 1; } ```

Useful functions (functions.pwn)

Or not useful ? ```PAWN native GetPlayerID(name[]) native stock IsVehicleUpsideDown(vehicleid) ```

Anti-Pausing, Anti-Tab, Anti-esc, ... (anti_pause.inc)

public OnPlayerPause(playerid);
public OnPlayerUnPause(playerid);

native IsPlayerPaused(playerid);

Example

#include <Anti_Pause>
 
public OnPlayerPause(playerid)
{
    new name[MAX_PLAYER_NAME], string[64];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s pressed esc.",name);
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
 
public OnPlayerUnPause(playerid)
{
    new name[MAX_PLAYER_NAME], string[64];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s unpaused.",name);
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}

Anti_Pause2.inc

If you have issues with errors or you just don't wanna use y_hooks for anti_pause.inc then use anti_pause2.inc Do note you have to add these functions to the right callbacks:

native P_OnPlayerConnect(playerid);
native P_OnPlayerUpdate(playerid);
native P_OnPlayerRequestClass(playerid);
native P_OnPlayerDisconnect(playerid);
native P_OnPlayerSpawn(playerid);

mta_mapmover.php

This is a webpage where u can mass move a mta map. Select a .map file, fill in the offsets and it will change all the positions from the original map to +offset. Afterwards you get the converted .map file back as download.

Demo: Here

About

Small and maybe useful things for a SA:MP Server

License:MIT License


Languages

Language:SourcePawn 54.0%Language:Pawn 23.9%Language:PHP 22.1%