Gate problem +rep
#1

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

Can you show me your new Chakgate[2]?
Reply
#3

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

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

Where did you create "Chakgate" (should say "new Chakgate[2]" or something similar)? You must create it outside any function!
Reply
#6

i have new Chakgate[2]; on top the sricpt already but still same error

here top of the sricpt new Chakgate[2], ChakgateBTN[2];
Reply
#7

Do you try with MoveObject?
Reply
#8

And do you have too this?
pawn Код:
Chakgate[0] = CreateDynamicObject(..................);
Chakgate[1] = CreateDynamicObject(..................);
I sent you a PM. xD
Reply
#9

Now i fix that. Thanks guys rep
Reply
#10

No problem, you're welcome.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)