Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //SQL config
- local host = "localhost";
- local user = "root";
- local pass = "";
- local db = "mafia_online";
- local sql;
- //GM Configs
- local scriptName = "Roleplay";
- local mapName = "Empire Bay";
- //Player Variables
- local admin = array(MAX_PLAYERS, 0); //same as admin[MAX_PLAYERS] in pawn
- //GameModeInit
- function scriptInit()
- {
- setGameModeText(scriptName);
- setMapName(mapName);
- setSummer(true);
- sql = mysql_connect(host, user, pass, db);
- return true;
- }
- addEventHandler( "onScriptInit", scriptInit );
- //OnPlayerSpawn
- function playerSpawn(playerid) {
- sendPlayerMessage(playerid, "Hello world");
- sendPlayerMessage(playerid, "Hello world", 255, 255, 255); /* can also use RGB to modify the colors of the text message */
- sendPlayerMessage(playerid, "Welcome to " + scriptName); /* Easy formating with just a plus */
- }
- addEventHandler ( "onPlayerSpawn", playerSpawn );
- //onPlayerDeath
- function playerDeath( playerid, killerid ) {
- }
- addEventHandler( "onPlayerDeath", playerDeath );
- //Commands
- //custom functions
- function isServerAdmin(playerid) {
- if(admin[playerid] == 1) return true;
- return false;
- }
Add Comment
Please, Sign In to add comment