SA-MP Forums Archive
Help Please - 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: Help Please (/showthread.php?tid=133638)



Help Please - matthew32112 - 13.03.2010

How Would I Make This Command Work Only For gTeam if the gteam id is 3 ?


Код:
AGate1 = CreateObject(969, 2830.5666503906, -1565.1704101563, 10.096872329712, 0, 0, 250.82507324219);
return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])//
{
	if (strcmp("/MGOPEN1", cmdtext, true, 10) == 0)
	{
		MoveObject(AGate1, 2832.1252441406, -1555.6474609375, 10.096872329712, 3.5);
		SendClientMessage(playerid, 0xB8860BAA, "The Maldini Family Gate Has Open");
		return 1;
	}
	if (strcmp("/MGCLOSE1", cmdtext, true, 10) == 0)
	{
	  MoveObject(AGate1, 2830.5666503906, -1565.1704101563, 10.096872329712, 3.5);
	  SendClientMessage(playerid, 0xB8860BAA, "Thank you The Maldini Family Gate Has Closed");
	  return 1;
	}
	return 0;
}
#endif




Re: Help Please - Jeffry - 13.03.2010

pawn Код:
if (strcmp("/MGOPEN1", cmdtext, true, 10) == 0 && gTeam[playerid]==3)
Should work.


Re: Help Please - Miguel - 13.03.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])//
{
  if (strcmp("/MGOPEN1", cmdtext, true, 10) == 0)
  {
    if(gTeam[playerid] == 3)
    {
      MoveObject(AGate1, 2832.1252441406, -1555.6474609375, 10.096872329712, 3.5);
      SendClientMessage(playerid, 0xB8860BAA, "The Maldini Family Gate Has Open");
    }
    return 1;
  }
  if (strcmp("/MGCLOSE1", cmdtext, true, 10) == 0)
  {
    if(gTeam[playerid] == 3)
    {
      MoveObject(AGate1, 2830.5666503906, -1565.1704101563, 10.096872329712, 3.5);
      SendClientMessage(playerid, 0xB8860BAA, "Thank you The Maldini Family Gate Has Closed");
    }
    return 1;
  }
  return 0;
}



Re: Help Please - matthew32112 - 13.03.2010

i get this



Код:
C:\Users\GIO\Desktop\Roleplay\filterscripts\MCasino.pwn(77) : error 017: undefined symbol "gTeam"
C:\Users\GIO\Desktop\Roleplay\filterscripts\MCasino.pwn(77) : warning 215: expression has no effect
C:\Users\GIO\Desktop\Roleplay\filterscripts\MCasino.pwn(77) : error 001: expected token: ";", but found "]"
C:\Users\GIO\Desktop\Roleplay\filterscripts\MCasino.pwn(77) : error 029: invalid expression, assumed zero
C:\Users\GIO\Desktop\Roleplay\filterscripts\MCasino.pwn(77) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors
.


Re: Help Please - matthew32112 - 13.03.2010

and thank you you helping me with this is very much appreciated


Re: Help Please - matthew32112 - 13.03.2010

* Removed *


Re: Help Please - aircombat - 13.03.2010

this is a filterscript , the teams should be scripted in ur gamemode and u didn't define the teams in ur filterscripts to i think u just have to mix them together (put ur filterscript into ur gamemode).


Re: Help Please - matthew32112 - 13.03.2010

Quote:
Originally Posted by [AC
Etch ]
this is a filterscript , the teams should be scripted in ur gamemode and u didn't define the teams in ur filterscripts to i think u just have to mix them together (put ur filterscript into ur gamemode).
lmao i feel silly now good idea man