How to - 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 to (
/showthread.php?tid=124083)
How to -
02manchestera - 28.01.2010
Код:
else if (PlayerToPointStripped(1, playerid,1545.0803,-1269.7253,17.4063, cx,cy,cz))
{
//hitman
SetPlayerPos(playerid, 1711.433715,-1669.379272,20.225049);
GameTextForPlayer(playerid, "~w~Hitman",5000,1);
SetPlayerInterior(playerid,18);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 18;
}
else if (PlayerToPointStripped(1, playerid,1710.433715,-1669.379272,20.225049, cx,cy,cz))
{
//hitam
SetPlayerPos(playerid, 1547.0803,-1269.7253,17.4063);
GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
}
How do i make it that only one team can go inside
Many thanks
Re: How to -
Correlli - 28.01.2010
pawn Код:
if(GetPlayerTeam(playerid) == _YOUR_TEAM_ID_)
{
// code..
}
GetPlayerTeam-function is just an example, i don't know what you're using to check players team.
Re: How to -
Babul - 28.01.2010
if you already have defined f.ex. a "new PlayerSkill[MAX_PLAYERS]" and its set to an unique value for hitmen only (lets assume its "#define PlayerSkillHitman 2", then just add a
Код:
if(PlayerSkill[playerid]==PlayerSkillHitman)
{
//your code
}
..so it becomes available to all players that got defined like "PlayerSkill[playerid]==PlayerSkillHitman" somewhere.
Re: How to -
will_92 - 29.01.2010
if(gTeam[playerid]== Team_Name)
{
YOUR CODE GOES HERE
}
Re: How to -
KnooL - 29.01.2010
Quote:
Originally Posted by ◄=[•
WIll[•]=► ]
if(gTeam== Team_Name)
{
YOUR CODE GOES HERE
}
|
this code will only check for a one slot variable.
pawn Код:
if(gTeam[playerid] == similairtosomething) {
...
}
Re: How to -
Correlli - 29.01.2010
Quote:
Originally Posted by KnooL
Quote:
Originally Posted by ◄=[•
WIll[•]=► ]
if(gTeam== Team_Name)
{
YOUR CODE GOES HERE
}
|
this code will only check for a one slot variable.
|
That code won't even work, it will output an error in the PAWN compiler.
Re: How to -
02manchestera - 29.01.2010
Код:
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
this is what i using mite just work adding that now looking at it lol
Re: How to -
will_92 - 29.01.2010
Quote:
Quote from: ◄=[•]WIll[•]=► on Today at 06:19:35 AM
if(gTeam== Team_Name)
{
YOUR CODE GOES HERE
}
this code will only check for a one slot variable.
That code won't even work, it will output an error in the PAWN compiler
|
Sorry I forgot the [playerid] I meant if(gTeam[playerid]== Team_Name)