Guest User

Untitled

a guest
Dec 12th, 2016
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. //SQL config
  2. local host = "localhost";
  3. local user = "root";
  4. local pass = "";
  5. local db = "mafia_online";
  6. local sql;
  7.  
  8. //GM Configs
  9. local scriptName = "Roleplay";
  10. local mapName = "Empire Bay";
  11.  
  12.  
  13. //Player Variables
  14. local admin = array(MAX_PLAYERS, 0); //same as admin[MAX_PLAYERS] in pawn
  15.  
  16. //GameModeInit
  17. function scriptInit()
  18. {
  19.     setGameModeText(scriptName);
  20.     setMapName(mapName);
  21.     setSummer(true);
  22.    
  23.    
  24.     sql = mysql_connect(host, user, pass, db);
  25.     return true;
  26. }
  27. addEventHandler( "onScriptInit", scriptInit );
  28.  
  29.  
  30.  
  31. //OnPlayerSpawn
  32. function playerSpawn(playerid) {
  33.     sendPlayerMessage(playerid, "Hello world");
  34.     sendPlayerMessage(playerid, "Hello world", 255, 255, 255); /* can also use RGB to modify the colors of the text message */
  35.     sendPlayerMessage(playerid, "Welcome to " + scriptName); /* Easy formating with just a plus */
  36. }
  37. addEventHandler ( "onPlayerSpawn", playerSpawn );
  38.  
  39.  
  40. //onPlayerDeath
  41. function playerDeath( playerid, killerid ) {
  42.    
  43. }
  44. addEventHandler( "onPlayerDeath", playerDeath );
  45.  
  46.  
  47.  
  48. //Commands
  49.  
  50. //custom functions
  51. function isServerAdmin(playerid) {
  52.     if(admin[playerid] == 1) return true;
  53.     return false;
  54. }
Add Comment
Please, Sign In to add comment