GetTeamName: Difference between revisions
Jump to navigation
Jump to search
Line 32: | Line 32: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==مـشـابهــه== | ||
{{Team_functions}} | {{Team_functions}} |
Revision as of 07:00, 13 July 2019
This function gets the team name of a team object.
Syntax
string getTeamName ( team theTeam )
OOP Syntax Help! I don't understand this!
- Method: team:getName(...)
- Variable: .name
- Counterpart: setTeamName
Required Arguments
- theTeam: The team you want to retrieve the name of.
Returns
Returns a string representing the team's name if the team object was valid, false otherwise.
مــثــال
هذا المثال يحصل على فريق اللاعب ويقوم بإرساله في الشات
function whatTeamAmIOn (source) -- تحصل على الفريق من المصدر اللي هو اللاعب local playerTeam = getPlayerTeam(source) if (playerTeam) then -- اذا كان في فريق outputChatBox(getPlayerName(source).." في فريق : "..getTeamName(playerTeam)) else -- اما اذا كان ماهو بفريق outputChatBox(getPlayerName(source).. " ليس بأي فريق ") end end -- يعمل عند كتابة الامر التالي "whatTeamAmIOn" addCommandHandler("whatTeamAmIOn", whatTeamAmIOn)
مـشـابهــه
- countPlayersInTeam
- getPlayerTeam
- getPlayersInTeam
- getTeamColor
- getTeamFriendlyFire
- getTeamFromName
- getTeamName