Gate System
#1

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

Try to search a little.

Could be useful!
This also!
Also this!
And this!
Even this!
Reply
#3

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

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);
Reply
#5

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

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

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

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)