Jump to content

Search the Community

Showing results for tags 'setplayerteam'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 3 results

  1. function create() FO = createTeam ( "Forever", 255, 0, 0 ) AV = createTeam ( "Avalanche", 255, 255, 255 ) GH = createTeam ( "Ghost", 255, 123, 0 ) end function addplayer(player, cmd, target, clan) local recipient = getPlayerFromName(target) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( clan ) ) then outputChatBox("* " .. recipientName .. " is already in your clan" , player, 255, 0, 0, true) else if recipient then local r, g, b local recipientName = getPlayerName(recipient) local playerName = getPlayerName(player) outputChatBox("*" .. recipientName .. " #FFFFFF has been added #FF0000" .. clan .. "#FFFFFF clan" , player, 255, 0, 0, true) outputChatBox("*" .. playerName .. " #FFFFFF added you to #FF0000" .. clan .. "#FFFFFF Clan", recipient, 255, 0, 0, true) setPlayerTeam ( recipient, clan ) r, g, b = getTeamColor (clan) setPlayerNametagColor ( recipient, r, g, b ) aclGroupAddObject (aclGetGroup(clan), "user."..accName) else outputChatBox("Sorry, we got 0 matches to the name" .. recipientName, player, 255, 0, 0) end end end function kickplayer(player, cmd, target, clan) local recipient = getPlayerFromName(target) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name local r,g,b if isObjectInACLGroup ("user."..accName, aclGetGroup ( clan ) ) then setPlayerTeam ( recipient, nil ) setPlayerNametagColor ( recipient, 225, 225, 225 ) aclGroupRemoveObject (aclGetGroup(clan), "user."..accName) else outputChatBox("The Player is Not in" .. clan .. "Clan" .. clan, player, 255, 0, 0) end end addCommandHandler("add", addplayer) addCommandHandler("ckick", kickplayer) addEventHandler ( "onResourceStart", getRootElement(), create ) This is a Clan system that i am working on, and when i run the script i get 2 errors , one is from the "setPlayerTeam" and the other one is from "GetTeamcolor" First One is : @ 'setPlayerTeam' [ Expected team at argument 2, got string 'AV' ] Second one is : @ 'getTeamColor' [Expected team at argument, got string 'AV'] Pls help me out , ik what this means but havent found a way to fix this And since This forum has helped me a lot , i am asking here , And also i would like to know a way to make this script to be able to Run for people In Acl group FOL , AVL and GHL ( which are clan leaders ) Thanks in Advance
  2. السلام عليكم ورحمة الله تعالى وبراكته انشاء الله تكونون بافضل حال اريد تصحيح الكود ---------------------------الكود سيرفر ----------------------------------- addEvent("OnTaxiJob",true) addEventHandler("OnTaxiJob",root, function (skin) if ( getElementData( source, "Job" ) == "TaxiJob" ) then return end setElementModel(source,tonumber(skin)) setElementData (source,"Job","TaxiJob" ) setPlayerTeam(source,"Unemployed") --- هنا الخطأ triggerClientEvent(source,"CreateTaxiMarkers",source) if getElementData(source,"Language") then outButDxChat("#AE00FF(TaxiJob) : #00FF00 لقد تم قبولك في وظيفة سائق التاكسي",source,0,255,255,true) else outButDxChat("#AE00FF(TaxiJob) : #00FF00You Join The Taxi Job ! ",source,0,255,255,true) end end) شكرا مسبقا
  3. function createTEAM () teamSTAFF = createTeam ("STAFF", 0, 255, 255) end addEventHandler("onResourceStart", resourceRoot, createTEAM) groupSTAFF = { [ "Console" ] = true, [ "Admin" ] = true, [ "SuperModerator" ] = true, [ "Moderator" ] = true }; function STAFF() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(groupSTAFF)) then setPlayerTeam(source, teamSTAFF) end end addEventHandler("onPlayerLogin",getRootElement(),STAFF) debugscript: http://prntscr.com/ds2kqi
×
×
  • Create New...