This file contains 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
// PPC_Defines.inc | |
// Define trucker ranks | |
enum TTruckerRanks | |
{ | |
RankStats, // Holds the required stats to get this rank | |
RankName[50] // Holds the name of the rank | |
} | |
new ATruckerRanks[][TTruckerRanks] = | |
{ |
This file contains 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
// place this somewhere in ~/pawno/include/PPC_Speedometer.inc | |
// i recommend at line 340, right after the money and score check | |
if (GetPVarInt(playerid, "AdminLevel") != APlayerData[playerid][PlayerLevel]) | |
SetPVarInt(playerid, "AdminLevel", APlayerData[playerid][PlayerLevel]); |
This file contains 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
// This file holds all functions for the toll-system | |
forward Toll(); | |
public Toll() | |
{ | |
// Loop through all players | |
for(new playerid; playerid < MAX_PLAYERS; playerid++) | |
{ | |
// If the player isn't connected, skip to the next player | |
if(APlayerData[playerid][LoggedIn] == false) continue; |
This file contains 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
// This file holds all functions for the toll-system | |
forward Toll(); | |
public Toll() | |
{ | |
// Loop through all players | |
for(new playerid; playerid < MAX_PLAYERS; playerid++) | |
{ | |
// If the player isn't connected, skip to the next player | |
if (APlayerData[playerid][LoggedIn] == false) |
This file contains 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
// Displays the statictics of the player | |
COMMAND:stats(playerid, params[]) | |
{ | |
// Setup local variables | |
new StatsMsg[1000], TitleMsg[128], StatsPlayer; | |
// Send the command to all admins so they can see it | |
SendAdminText(playerid, "/stats", params); | |
// Check if the player has logged in |
This file contains 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
#!/bin/bash | |
# | |
# How to check status of URLs from text file | |
# https://stackoverflow.com/a/25136723 | |
# | |
# This script reads a file with URLs (line-by-line) and checks their http status code | |
# The results will be written to a temporary file locaed in ~/tmp | |
# |
This file contains 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
#!/bin/bash | |
# Force a shell script to run under bash instead of sh | |
# https://stackoverflow.com/a/17752318 | |
if [[ ! ${BASH_VERSION} ]]; then | |
echo "Sorry, please run this script with 'bash' only." 1>&2 | |
exit 1 | |
fi |
This file contains 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
<?php | |
function validateDomain(string $domain) :bool { | |
/** | |
* First remove any whitespaces and set string to lowercase. | |
*/ | |
$domain = trim($domain); | |
$domain = mb_strtolower($domain, "UTF-8"); | |
/** |
This file contains 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
# Slugify | |
# | |
# URL: https://duncanlock.net/blog/2021/06/15/good-simple-bash-slugify-function/ | |
# | |
# Transliterate everything to ASCII | |
# Strip out apostrophes | |
# Anything that's not a letter or number to a dash | |
# Strip leading & trailing dashes | |
# Everything to lowercase | |
function slugify() { |
This file contains 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
#!/bin/bash | |
# Script Description: | |
# This Bash script fetches JSON data associated with a BuyMeACoffee profile | |
# for a specified username and decodes specific HTML entities in the retrieved data. | |
# Function to decode HTML entities in a string | |
html_entity_decode() { | |
# Use sed to replace HTML entity " with a double quote (") | |
echo "$1" | sed -e 's/"/"/g' |