Gate problem +rep - 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 problem +rep (
/showthread.php?tid=308413)
Gate problem +rep -
N0FeaR - 03.01.2012
Hey i make gate system with onplayerpressbutton but have few problems
here error i get yes i have add new Chakgate[2];
Код:
C:\Users\Robin\Desktop\RMRP\gamemodes\test.pwn(398) : error 017: undefined symbol "Chakgate"
C:\Users\Robin\Desktop\RMRP\gamemodes\test.pwn(399) : error 017: undefined symbol "Chakgate"
line
Код:
forward CloseChakgate();
public CloseChakgate()
{
line 398 MoveDynamicObject(Chakgate[0],166.6210, -1349.9562, 68.9509,4);
live 399 MoveDynamicObject(Chakgate[1],172.0978, -1350.4635, 68.9509,4);
return 1;
}
Respuesta: Gate problem +rep -
[DOG]irinel1996 - 03.01.2012
Can you show me your
new Chakgate[2]?
Re: Gate problem +rep -
N0FeaR - 03.01.2012
this one ?
Код:
if(buttonid == ChakgateBTN[0] || buttonid == ChakgateBTN[1])
{
if((PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) && PlayerInfo[playerid][pRank] >= 5)
{
MoveDynamicObject(Chakgate[0],161.7701, -1349.4697, 68.9509,4);
MoveDynamicObject(Chakgate[1],177.5089, -1350.8038, 68.9509,4);
SetTimer("CloseChakgate", 2500, 0);
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
return 1;
}
Respuesta: Gate problem +rep -
[DOG]irinel1996 - 03.01.2012
No, you have to put on the top of your script
new Chakgate[2]; to define the gate objects.
pawn Код:
#include <a_samp>
/*
macros (defines),
etc, etc,
etc...
*/
new Chakgate[2];
/* ... Rest of script ... */
Re: Gate problem +rep -
Slice - 03.01.2012
Where did you create "Chakgate" (should say "new Chakgate[2]" or something similar)? You must create it
outside any function!
Re: Gate problem +rep -
N0FeaR - 03.01.2012
i have new Chakgate[2]; on top the sricpt already but still same error
here top of the sricpt new Chakgate[2], ChakgateBTN[2];
Re: Gate problem +rep -
#Pwn. - 03.01.2012
Do you try with MoveObject?
Respuesta: Gate problem +rep -
[DOG]irinel1996 - 03.01.2012
And do you have too this?
pawn Код:
Chakgate[0] = CreateDynamicObject(..................);
Chakgate[1] = CreateDynamicObject(..................);
I sent you a PM. xD
Re: Gate problem +rep -
N0FeaR - 03.01.2012
Now i fix that. Thanks guys rep
Respuesta: Gate problem +rep -
[DOG]irinel1996 - 03.01.2012
No problem, you're welcome.