SA-MP Forums Archive
Gate System - 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)
+--- Thread: Gate System (/showthread.php?tid=358972)



Gate System - Tuntun - 12.07.2012

Hello
Can i have a help please?i need a gate system.. with /open and /close.. please help me...
please


Re: Gate System - RedJohn - 12.07.2012

Try to search a little.

Could be useful!
This also!
Also this!
And this!
Even this!


Re: Gate System - clarencecuzz - 12.07.2012

Give me the gate coordinates and I will script it for you. Over Skype if you want...


Re: Gate System - Tuntun - 12.07.2012

ok
AddPlayerClass(0,1706.4076,1607.4928,10.0097,95.61 84,0,0,0,0,0,0); //
and the object's id:CreateObject(980, 1705.96, 1607.40, 12.06, 0.00, 0.00, 254.06);


Re: Gate System - clarencecuzz - 12.07.2012

Do you want automatic gates, or gates that still use a command?


Re: Gate System - Tuntun - 12.07.2012

hey i try to create a gate system but i see some error please help.. it is:

F:\test.pwn(3) : error 010: invalid function or declaration
F:\test.pwn(5) : error 010: invalid function or declaration
F:\test.pwn(7) : error 010: invalid function or declaration
F:\test.pwn(10) : error 010: invalid function or declaration
F:\test.pwn(15) : error 010: invalid function or declaration
F:\test.pwn(17) : error 010: invalid function or declaration
F:\test.pwn(19) : error 010: invalid function or declaration
F:\test.pwn(22) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


8 Errors.
And the Pwno:
Код:
#include <a_samp>

if(strcmp(cmdtext,"/opengate", true) == 0)
  {
   if (gTeam[playerid] == TEAM_GROVE)
   {                                               
		 if(PlayerToPoint(15.0, playerid,1706.4076,1607.4928,10.0097))
		 {
 	   MoveObject(gate, 980, 1705.96, 1607.40, 12.06, 0.00, 0.00);
     return 1;
     }
  }
}

if(strcmp(cmdtext,"/closegate", true) == 0)
  {
   if (gTeam[playerid] == TEAM_GROVE)
   {
		 if(PlayerToPoint(15.0, playerid,1706.4076,1607.4928,10.0097))  
		 {
 	   MoveObject(gate, 980, 1705.96, 1607.40, 12.06, 0.00, 0.00);
     return 1;
     }
  }
}



Re: Gate System - clarencecuzz - 12.07.2012

pawn Код:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/opengate", true) == 0)
  {
   if (gTeam[playerid] == TEAM_GROVE)
   {                                              
         if(PlayerToPoint(15.0, playerid,1706.4076,1607.4928,10.0097))
         {
       MoveObject(gate, 980, 1705.96, 1607.40, 12.06, 0.00, 0.00);
     return 1;
     }
  }
}

if(strcmp(cmdtext,"/closegate", true) == 0)
  {
   if (gTeam[playerid] == TEAM_GROVE)
   {
         if(PlayerToPoint(15.0, playerid,1706.4076,1607.4928,10.0097))  
         {
       MoveObject(gate, 980, 1705.96, 1607.40, 12.06, 0.00, 0.00);
     return 1;
     }
  }
}
return 1;
}



Re: Gate System - Tuntun - 12.07.2012

i want a gate system... all can open it.. why it is TEAM_GROVE?


Re: Gate System - clarencecuzz - 12.07.2012

You added TEAM_GROVE, so it suggested you were going to use it only for TEAM_GROVE.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/opengate", true) == 0)
  {                                      
         if(IsPlayerInRangeOfPoint(playerid, 15,1706.4076,1607.4928,10.0097))
         {
       MoveObject(gate, 1705.96, 1607.40, 12.06, 0.00, 0.00,0.00);
     return 1;
     }
}

if(strcmp(cmdtext,"/closegate", true) == 0)
  {
         if(IsPlayerInRangeOfPoint(playerid, 15,1706.4076,1607.4928,10.0097))  
         {
       MoveObject(gate, 1705.96, 1607.40, 12.06, 0.00, 0.00, 0.00);
     return 1;
     }
}
return 1;
}



Re: Gate System - Tuntun - 12.07.2012

man i get new error..
Код:
F:\test.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText")
F:\test.pwn(3) : error 017: undefined symbol "strcmp"
F:\test.pwn(5) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
F:\test.pwn(7) : error 017: undefined symbol "MoveObject"
F:\test.pwn(8) : warning 217: loose indentation
F:\test.pwn(12) : error 017: undefined symbol "strcmp"
F:\test.pwn(14) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
F:\test.pwn(16) : error 017: undefined symbol "MoveObject"
F:\test.pwn(17) : warning 217: loose indentation
F:\test.pwn(22) : error 054: unmatched closing brace ("}")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.