How - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How (
/showthread.php?tid=141982)
How -
laser50 - 16.04.2010
do i set someone's team using Gteam??
Re: How -
Torran - 16.04.2010
OnPlayerRequestClass
if(classid == WHATEVER)
{
gTeam[playerid] = WHATEVER;
}
Re: How -
laser50 - 16.04.2010
can i also make them that team in a command?
Re: How -
Torran - 16.04.2010
Quote:
Originally Posted by laser50
can i also make them that team in a command?
|
Yes,
Just use
gTeam[playerid] = TEAM;
To set the team,
And:
if(gTeam[playerid] == TEAM)
To get a players team
Re: How -
laser50 - 16.04.2010
my command isent working at all...
Код:
if (strcmp("/equip", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20.0, 255.3812,77.2109,1003.6406))
{
if(gTeam[playerid] == TEAM_COP)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Armoury", "Choose a package:/nOfficer Package/nSWAT Package/nUndercover Package/nRiot Package/nInvestigation Package", "Select", "Cancel");
}
}
}
return 1;
}
Re: How -
Torran - 16.04.2010
What exactly dosent work about it
Re: How -
laser50 - 16.04.2010
i do the command and.. nothing happens
btw, its in LSPD witch is interior 6, i added if(GetPlayerInterior(playerid) == 6) etc etc.
Re: How -
Torran - 16.04.2010
Try taking the
, 10 of your command
So:
if (strcmp("/equip", cmdtext, true) == 0)
Re: How -
Adil - 16.04.2010
Quote:
Originally Posted by laser50
my command isent working at all...
Код:
if (strcmp("/equip", cmdtext, true, 10) == 0)
|
pawn Код:
if (strcmp("/equip", cmdtext, true) == 0)
Re: How -
Torran - 16.04.2010
Quote:
Originally Posted by Adil_Rahoo
Quote:
Originally Posted by laser50
my command isent working at all...
Код:
if (strcmp("/equip", cmdtext, true, 10) == 0)
|
pawn Код:
if (strcmp("/equip", cmdtext, true) == 0)
|
Already said that and presuming by no reply its fixed??