https://wiki.multitheftauto.com/api.php?action=feedcontributions&user=Al7arthy&feedformat=atomMulti Theft Auto: Wiki - User contributions [en]2024-03-29T01:07:56ZUser contributionsMediaWiki 1.39.3https://wiki.multitheftauto.com/index.php?title=GetTeamName&diff=63278GetTeamName2019-07-13T07:07:51Z<p>Al7arthy: /* مـشـابهــه */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function gets the team name of a team object.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getTeamName ( team theTeam )<br />
</syntaxhighlight><br />
{{OOP||[[team]]:getName|name|setTeamName}}<br />
===Required Arguments===<br />
theTeam: The team you want to retrieve the name of.<br />
<br />
==Example==<br />
This example gets the current team of a player, then prints its name to the chatbox.<br />
<syntaxhighlight lang="lua"><br />
function whatTeamAmIOn (source)<br />
-- Get the player's team (source is the player who entered the command)<br />
local playerTeam = getPlayerTeam(source)<br />
<br />
if (playerTeam) then -- if he was on a team<br />
outputChatBox(getPlayerName(source).." is on team: "..getTeamName(playerTeam))<br />
else<br />
outputChatBox(getPlayerName(source).. " isn't on a team")<br />
end<br />
end<br />
<br />
-- Add console command to find your team when 'whatTeamAmIOn' is typed.<br />
addCommandHandler("whatTeamAmIOn", whatTeamAmIOn)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Team_functions}}</div>Al7arthyhttps://wiki.multitheftauto.com/index.php?title=GetTeamName&diff=63277GetTeamName2019-07-13T07:07:30Z<p>Al7arthy: /* الحجج المطلوبة */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function gets the team name of a team object.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getTeamName ( team theTeam )<br />
</syntaxhighlight><br />
{{OOP||[[team]]:getName|name|setTeamName}}<br />
===Required Arguments===<br />
theTeam: The team you want to retrieve the name of.<br />
<br />
==Example==<br />
This example gets the current team of a player, then prints its name to the chatbox.<br />
<syntaxhighlight lang="lua"><br />
function whatTeamAmIOn (source)<br />
-- Get the player's team (source is the player who entered the command)<br />
local playerTeam = getPlayerTeam(source)<br />
<br />
if (playerTeam) then -- if he was on a team<br />
outputChatBox(getPlayerName(source).." is on team: "..getTeamName(playerTeam))<br />
else<br />
outputChatBox(getPlayerName(source).. " isn't on a team")<br />
end<br />
end<br />
<br />
-- Add console command to find your team when 'whatTeamAmIOn' is typed.<br />
addCommandHandler("whatTeamAmIOn", whatTeamAmIOn)<br />
</syntaxhighlight><br />
<br />
==مـشـابهــه==<br />
{{Team_functions}}</div>Al7arthyhttps://wiki.multitheftauto.com/index.php?title=GetTeamName&diff=63276GetTeamName2019-07-13T07:06:15Z<p>Al7arthy: /* مــثــال */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function gets the team name of a team object.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getTeamName ( team theTeam )<br />
</syntaxhighlight><br />
{{OOP||[[team]]:getName|name|setTeamName}}<br />
===الحجج المطلوبة===<br />
*'''theTeam:''' الفريق اللي تبي تستخرج اسمه<br />
<br />
==Example==<br />
This example gets the current team of a player, then prints its name to the chatbox.<br />
<syntaxhighlight lang="lua"><br />
function whatTeamAmIOn (source)<br />
-- Get the player's team (source is the player who entered the command)<br />
local playerTeam = getPlayerTeam(source)<br />
<br />
if (playerTeam) then -- if he was on a team<br />
outputChatBox(getPlayerName(source).." is on team: "..getTeamName(playerTeam))<br />
else<br />
outputChatBox(getPlayerName(source).. " isn't on a team")<br />
end<br />
end<br />
<br />
-- Add console command to find your team when 'whatTeamAmIOn' is typed.<br />
addCommandHandler("whatTeamAmIOn", whatTeamAmIOn)<br />
</syntaxhighlight><br />
<br />
==مـشـابهــه==<br />
{{Team_functions}}</div>Al7arthyhttps://wiki.multitheftauto.com/index.php?title=GetTeamName&diff=63275GetTeamName2019-07-13T07:03:48Z<p>Al7arthy: /* Required Arguments */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function gets the team name of a team object.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getTeamName ( team theTeam )<br />
</syntaxhighlight><br />
{{OOP||[[team]]:getName|name|setTeamName}}<br />
===الحجج المطلوبة===<br />
*'''theTeam:''' الفريق اللي تبي تستخرج اسمه<br />
<br />
==مــثــال==<br />
هذا المثال يحصل على فريق اللاعب ويقوم بإرساله في الشات<br />
<syntaxhighlight lang="lua"><br />
function whatTeamAmIOn (source)<br />
-- تحصل على الفريق من المصدر اللي هو اللاعب<br />
local playerTeam = getPlayerTeam(source)<br />
<br />
if (playerTeam) then -- اذا كان في فريق<br />
outputChatBox(getPlayerName(source).." في فريق : "..getTeamName(playerTeam))<br />
else -- اما اذا كان ماهو بفريق<br />
outputChatBox(getPlayerName(source).. " ليس بأي فريق ")<br />
end<br />
end<br />
<br />
-- يعمل عند كتابة الامر التالي "whatTeamAmIOn"<br />
addCommandHandler("whatTeamAmIOn", whatTeamAmIOn)<br />
</syntaxhighlight><br />
<br />
==مـشـابهــه==<br />
{{Team_functions}}</div>Al7arthyhttps://wiki.multitheftauto.com/index.php?title=GetTeamName&diff=63274GetTeamName2019-07-13T07:01:37Z<p>Al7arthy: /* Returns */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function gets the team name of a team object.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getTeamName ( team theTeam )<br />
</syntaxhighlight><br />
{{OOP||[[team]]:getName|name|setTeamName}}<br />
===Required Arguments===<br />
*'''theTeam:''' The team you want to retrieve the name of.<br />
<br />
==مــثــال==<br />
هذا المثال يحصل على فريق اللاعب ويقوم بإرساله في الشات<br />
<syntaxhighlight lang="lua"><br />
function whatTeamAmIOn (source)<br />
-- تحصل على الفريق من المصدر اللي هو اللاعب<br />
local playerTeam = getPlayerTeam(source)<br />
<br />
if (playerTeam) then -- اذا كان في فريق<br />
outputChatBox(getPlayerName(source).." في فريق : "..getTeamName(playerTeam))<br />
else -- اما اذا كان ماهو بفريق<br />
outputChatBox(getPlayerName(source).. " ليس بأي فريق ")<br />
end<br />
end<br />
<br />
-- يعمل عند كتابة الامر التالي "whatTeamAmIOn"<br />
addCommandHandler("whatTeamAmIOn", whatTeamAmIOn)<br />
</syntaxhighlight><br />
<br />
==مـشـابهــه==<br />
{{Team_functions}}</div>Al7arthyhttps://wiki.multitheftauto.com/index.php?title=GetTeamName&diff=63273GetTeamName2019-07-13T07:00:41Z<p>Al7arthy: /* See Also */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function gets the team name of a team object.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getTeamName ( team theTeam )<br />
</syntaxhighlight><br />
{{OOP||[[team]]:getName|name|setTeamName}}<br />
===Required Arguments===<br />
*'''theTeam:''' The team you want to retrieve the name of.<br />
<br />
===Returns===<br />
Returns a string representing the team's name if the team object was valid, ''false'' otherwise.<br />
<br />
==مــثــال==<br />
هذا المثال يحصل على فريق اللاعب ويقوم بإرساله في الشات<br />
<syntaxhighlight lang="lua"><br />
function whatTeamAmIOn (source)<br />
-- تحصل على الفريق من المصدر اللي هو اللاعب<br />
local playerTeam = getPlayerTeam(source)<br />
<br />
if (playerTeam) then -- اذا كان في فريق<br />
outputChatBox(getPlayerName(source).." في فريق : "..getTeamName(playerTeam))<br />
else -- اما اذا كان ماهو بفريق<br />
outputChatBox(getPlayerName(source).. " ليس بأي فريق ")<br />
end<br />
end<br />
<br />
-- يعمل عند كتابة الامر التالي "whatTeamAmIOn"<br />
addCommandHandler("whatTeamAmIOn", whatTeamAmIOn)<br />
</syntaxhighlight><br />
<br />
==مـشـابهــه==<br />
{{Team_functions}}</div>Al7arthyhttps://wiki.multitheftauto.com/index.php?title=GetTeamName&diff=63272GetTeamName2019-07-13T06:59:49Z<p>Al7arthy: /* Example */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function gets the team name of a team object.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getTeamName ( team theTeam )<br />
</syntaxhighlight><br />
{{OOP||[[team]]:getName|name|setTeamName}}<br />
===Required Arguments===<br />
*'''theTeam:''' The team you want to retrieve the name of.<br />
<br />
===Returns===<br />
Returns a string representing the team's name if the team object was valid, ''false'' otherwise.<br />
<br />
==مــثــال==<br />
هذا المثال يحصل على فريق اللاعب ويقوم بإرساله في الشات<br />
<syntaxhighlight lang="lua"><br />
function whatTeamAmIOn (source)<br />
-- تحصل على الفريق من المصدر اللي هو اللاعب<br />
local playerTeam = getPlayerTeam(source)<br />
<br />
if (playerTeam) then -- اذا كان في فريق<br />
outputChatBox(getPlayerName(source).." في فريق : "..getTeamName(playerTeam))<br />
else -- اما اذا كان ماهو بفريق<br />
outputChatBox(getPlayerName(source).. " ليس بأي فريق ")<br />
end<br />
end<br />
<br />
-- يعمل عند كتابة الامر التالي "whatTeamAmIOn"<br />
addCommandHandler("whatTeamAmIOn", whatTeamAmIOn)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Team_functions}}</div>Al7arthy