Help Please
#1

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

Reply
#2

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

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;
}
Reply
#4

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
.
Reply
#5

and thank you you helping me with this is very much appreciated
Reply
#6

* Removed *
Reply
#7

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).
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)