Gate wont work! - 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 wont work! (
/showthread.php?tid=395449)
Gate wont work! -
showarn - 26.11.2012
Hello my gate wont work and i dont now why? :S i have included
Include List
Код:
#include <a_samp>
#include <streamer>
#include <sscanf2>
#include <Dini>
Top of the script
Код:
new FBIgate; //The Gate object when its Closed!
new FBIgate1 = 0;
my script
Код:
public OnGameModeInit()
{
FBIgate = CreateObject(968, 1544.6943359375, -1630.73046875, 13.27956199646, 0.000000, 90, 90); // The gate you made when its CLOSED!!
return 1;
}
Scripts
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/FBIGATE", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,9,1589.00000000,-1637.90002441,15.19999981))// This has to be the first 3 Coordinates of the gate when its Closed!
{ //FBI GATE
if(FBIGATE1==0)
{
FBIGATE1 = 1;
MoveObject(FBIGATE, 1589.00000000,-1637.90002441,8.30000019, 1.0);// Coordinates THIS IS WHEN ITS OPEN!
}
else if(FBIGATE1==1)
{
FBIGATE1 = 0; //
MoveObject(FBIGATE,1589.00000000,-1637.90002441,15.19999981, 1.0);//This has to be the same as "InRangeOfPoint" AND WHEN THE GATE IS CLOSED!
}
return 1;
}
}
return 1;
}
Errors
Код:
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(101) : error 017: undefined symbol "FBIGATE1"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(103) : error 017: undefined symbol "FBIGATE1"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(103) : warning 215: expression has no effect
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(104) : error 017: undefined symbol "FBIGATE"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(106) : error 017: undefined symbol "FBIGATE1"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(108) : error 017: undefined symbol "FBIGATE1"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(108) : warning 215: expression has no effect
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(109) : error 017: undefined symbol "FBIGATE"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(114) : warning 217: loose indentation
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(42) : warning 204: symbol is assigned a value that is never used: "FBIgate"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(42 -- 251) : warning 203: symbol is never used: "FBIgate1"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
if any1 cud help me that wud be cool since i guess this is a simple problem :P
Re: Gate wont work! -
ViniBorn - 26.11.2012
You declared FBIgate ?
Re: Gate wont work! -
Camorra - 26.11.2012
new FBIGATE1;
on the top
Re: Gate wont work! -
showarn - 26.11.2012
i just had to forgott to write it in this thread but i have already done that
i already have this
Код:
//news
new FBIgate; //The Gate object when its Closed!
new FBIgate1 = 0;
Re: Gate wont work! -
you10 - 26.11.2012
It is case-sensitive.
This should work
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/FBIGATE", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,9,1589.00000000,-1637.90002441,15.19999981))// This has to be the first 3 Coordinates of the gate when its Closed!
{ //FBI GATE
if(FBIgate1==0)
{
FBIgate1 = 1;
MoveObject(FBIgate, 1589.00000000,-1637.90002441,8.30000019, 1.0);// Coordinates THIS IS WHEN ITS OPEN!
}
else if(FBIgate1==1)
{
FBIgate1 = 0; //
MoveObject(FBIgate,1589.00000000,-1637.90002441,15.19999981, 1.0);//This has to be the same as "InRangeOfPoint" AND WHEN THE GATE IS CLOSED!
}
return 1;
}
}
return 1;
}