Jump to content

Gabriel Vasconcelos

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Gabriel Vasconcelos's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Yes there are two functions in a single command one for the player that enters the command and another for the doctor to receive
  2. elseif ( source == pages['home'].base_medic ) then executeCommandHandler("medic", ThePlayer) function medicGO(source) for i, player in ipairs(getElementsByType("player")) do local uj = getElementData ( player, "Job" )== "Medic" or false if type(uj) == "boolean" then if uj == true then outputMessage("#ffffff[ Clientes #ffffff] - #FFFFFFO Jogador #ffffff"..getPlayerName(source).." #ffffffChamou Por um Samu",player, 255, 255, 255, true ) outputMessage("#ffffff[ Clientes #ffffff] - #FFFFFFDigite /Localizar "..getPlayerName(source).." #ffffffPara Marcar O Jogador No Mapa",player, 255, 255, 255, true ) end end end end addCommandHandler("medic",medicGO) -------------------------------------------------------------------- function Comandomedic ( ThePlayer ) outputMessage("#ffffff[ Aviso #ffffff] - #FFFFFFOs SAMU's Foram Avisados, Aguente firme", ThePlayer, 255, 255, 255, true ) end addCommandHandler("medic", Comandomedic ) this would be on a cell phone, when the player clicks on the icon he calls a doctor. but I can not make it work :c Help me.
  3. if ( tostring ( get ( "CONNECTION_TYPE" ) ):lower() == "mysql" ) then outputConsole ( "Attempting to connect as MySQL... Please wait") db = dbConnect( "mysql", "dbname="..tostring(get("DATABASE_NAME"))..";host="..tostring(get("MYSQL_HOST"))..";port="..tostring(get("MYSQL_PORT"))..";unix_socket=/opt/lampp/var/mysql/mysql.sock", tostring(get("MYSQL_USER")), tostring(get("MYSQL_PASS")), "share=1;autoreconnect=1" ); elseif ( tostring ( get ( "CONNECTION_TYPE" ) ):lower() == "sqlite" ) then db = dbConnect ( "sqlite", tostring(get("DATABASE_NAME")) .. ".sql" ); else error ( tostring(get("CONNECTION_TYPE")) .. " is an invalid SQL connection -- valid: mysql, sqlite" ); end if not db then print ( "The database has failed to connect") return else print ( "Database has been connected") end function db_query ( ... ) local data = { ... } return dbPoll ( dbQuery ( db, ... ), - 1 ) end function db_exec ( ... ) return dbExec ( db, ... ); end <meta> <info author="NG Scripting Team" name="NG SQL" type="script" version="1.0" /> <script src="sql.lua" /> <export function="db_query" /> <export function="db_exec" /> <export function="createAccount" /> <export function="account_exist" /> <export function="saveAllData" /> <export function="savePlayerData" /> <settings> <setting name="CONNECTION_TYPE" value="mysql" accept="mysql, sqlite" description="MySQL or SQLite connection for you database" /> <setting name="DATABASE_NAME" value="gg" accept="Strings" description="Name of MySQL database, file name for SQLite" /> <setting name="MYSQL_HOST" value="" accept="Hosts" description="Host for you MySQL Database" /> <setting name="MYSQL_PORT" value="3306" accept="Port #" description="Port for you MySQL Database" /> <setting name="MYSQL_USER" value="" accept="Usernames" description="Username for you MySQL Database" /> <setting name="MYSQL_PASS" value="" accept="Passwords" description="Password for you MySQL Database" /> </settings> <min_mta_version server="1.3.4-0.00000"></min_mta_version> </meta> this is the original script. I can not get it to use the server's own internal db, what to do?
  4. the problem is that it is working, but for everyone, I want only those who are part of the LAW to use
  5. So, this would be for a given team, in this case it would be: function team local g_team = getTeamFromName( "Law Enforcement" ) setPlayerTeam(player, g_team) setTeamFriendlyFire(g_team, false) addPedClothes ( player, "policetr", "policetr", 17 ) end addCommandHandler ( "cloth", team ) Right?
  6. function team( if (isObjectInACLGroup("user." ..account, aclGetGroup("Law Enforcement")) then setPlayerTeam(source, team) setTeamFriendlyFire(team, false) addPedClothes ( source, "policetr", "policetr", 17 ) end end) addCommandHandler ( "cloth", team ) how could it solve?
  7. Help me with my script, does not work. function team( if (isObjectInACLGroup("user." ..account, aclGetGroup("Law Enforcement"))) then setPlayerTeam(source, team) setTeamFriendlyFire(team, false) addPedClothes ( source, "policetr", "policetr", 17 ) end end) addEventHandler ( "onPlayerTeamChange", getRootElement (), team ) help me with my script
×
×
  • Create New...