samp.directory
← Scripts y librerías

zeus2198/Dynamic-map-manager-for-SA-MP-servers

A tool to insert/delete maps in sa-mp servers using webpage

Herramienta★ 7actualizado feb 2017Sin licenciaPHP
Abrir en GitHub

Este repositorio no tiene archivo de licencia. Se puede leer, pero eso por sí solo no da permiso para reutilizarlo.

README.md

What exactly is this?

This is a dynamic map adder that helps you to add or delete maps from web in server. With this you don't need to upload maps as a FilterScript from FTP, you can just simply insert using a webpage. You can delete maps, see map info and add maps from web, and those maps can be loaded in server via a command.

Note that the pawn script is based on MySQL plugin by BlueG version r39-2 yet to be updated to latest version

Pics of web page in action

Pics of in-game script in action

Getting started

To get started you just need to edit the settings as told below

For web part:

Open config.php and edit the code in it. config.php looks something like this :

<?php 
$mysql_host = "127.0.0.1"; 
$mysql_user = "root"; 
$mysql_password = ""; 
$mysql_database = "DB_Name"; 

$server_name = "Your Server Name"; 
$server_logo = "Demo Server Logo Here"; 
?>

For in-game part:

Edit the #define's at top of pawn script It looks something like this :

#define mysql_host       "127.0.0.1"
#define mysql_user       "root"
#define mysql_password   ""
#define mysql_database   "DB_NAME"

#define AdminCheck(%0) !IsPlayerAdmin(%0)// Method to check if player is admin or not, see below

/*
	Do NOT change the part '#define AdminCheck(%0)', you need to change the part '!IsPlayerAdmin(%0)'
	Example :

		Lets say I have a variable named pInfo[playerid][pAdmin] to check for player admin and I
		want that only admins with admin level 5 or more can use map loading/unloading command.
		So I will do something like this :
		
		    #define AdminCheck(%0) pInfo[%0][pAdmin] < 5
		    
		PS. '%0' is the playerid, use '%0' not playerid in #define
*/


#define MAX_MAPS 100 //max maps that can be loaded at a time in server

In-game Commands

CommandDescription
/maploadShows a list of 'UnLoaded' maps from database. After clicking on a map from list its information is shown in a dialog provided with two buttons "Load" and "Cancel". As the name suggest "Load" button loads the map into server.
/mlShort form of command '/mapload'
/mapunloadThis command is the opposite of '/mapload' command. This command shows a list of 'Loaded' maps. After clicking on a map from list its information is shown in a dialog with two buttons named "UnLoad" and "Cancel". Again as the name suggests 'UnLoad' button unloads the map.
/mulShort form of command '/mapunload'

dynamicpawnphpsa-mpsa-mp-serversamp

Esta página se genera con lo que GitHub publica sobre el repositorio. samp.directory no aloja el código. Informar de un problema con esta ficha

zeus2198/Dynamic-map-manager-for-SA-MP-servers: Herramienta de SA-MP | samp.directory