[Tutorial] How to script a moving Gate
#21

Quote:
Originally Posted by Xander5270
Thanks, Now I only getting this errors

Code:
C:\Users\FOZZ\Downloads\samp022server.win32\gamemodes\gf.pwn(6818) : error 017: undefined symbol "hqgate"
C:\Users\FOZZ\Downloads\samp022server.win32\gamemodes\gf.pwn(8146) : error 017: undefined symbol "hqgate"
C:\Users\FOZZ\Downloads\samp022server.win32\gamemodes\gf.pwn(8158) : error 017: undefined symbol "hqgate"
What did you wrote as "new" ? new ??gate
Reply
#22

Quote:
Originally Posted by [18SG
Juicy_J ]
Quote:
Originally Posted by Xander5270
Thanks, Now I only getting this errors

Code:
C:\Users\FOZZ\Downloads\samp022server.win32\gamemodes\gf.pwn(6818) : error 017: undefined symbol "hqgate"
C:\Users\FOZZ\Downloads\samp022server.win32\gamemodes\gf.pwn(8146) : error 017: undefined symbol "hqgate"
C:\Users\FOZZ\Downloads\samp022server.win32\gamemodes\gf.pwn(8158) : error 017: undefined symbol "hqgate"
What did you wrote as "new" ? new ??gate
Code:
	if(strcmp(cmdtext,"/opengate", true) == 0)
  	{
   if (gTeam[playerid] == TEAM_BLUE)
   {
		 if(PlayerToPoint(15.0, playerid,283.2922,-1543.4369,24.7436))
		 {
 	   MoveObject(hqgate, 2294.237060,2499.121337,10.422034,1.500000);
     return 1;
     }
  }
}

	if(strcmp(cmdtext,"/closegate", true) == 0)
  {
   if (gTeam[playerid] == TEAM_BLUE)
   {
		 if(PlayerToPoint(15.0, playerid,283.2922,-1543.4369,24.7436))
		 {
 	   MoveObject(hqgate, 2294.206787,2499.329101,5.770081,270.057617,1.500000);
     return 1;
     }
  }
}
Reply
#23

A little shitty way to create gates. Why don't you make it open/close automatically? Withoud any need to use commands.
Reply
#24

Its a few months ago, that I've done this topic. And why shitty? It helps many people, so better watch what you say!
Reply
#25

It isn't shitty because it is helpfull. It is shitty because it requires using commands. What if player who opened the gate won't close it? The game will be ruined! And also there has to be somebody who checks if that happend... .
Reply
#26

Quote:
Originally Posted by [18SG
Juicy_J ]
Its a few months ago, that I've done this topic. And why shitty? It helps many people, so better watch what you say!
Could I just get an answer please?
Reply
#27

good but you should put in the "Scripting Tutorial" section
Reply
#28

Quote:
Originally Posted by hadzx
View Post
good but you should put in the "Scripting Tutorial" section
This section did not exist when this topic was created.
Reply
#29

what if I wanted 2 gates to open how would I do that pm me and nice tutorial , rep +5
Reply
#30

Bad indendation.
Reply
#31

how would I do it by only using one command /gate?
Reply
#32

You didn't post in right section although! But i still like it, useful if you ask me.
Reply
#33

This post was posted in 2008, I think that a moderator failed somewhere.
Reply
#34

....
Reply
#35

Nice tut
Reply
#36

O.O even before I joined sa-mp forums :P
Reply
#37

guys this is my script , is it right too?

Code:
CreateDynamicObject(2957,1116.0996100,-713.6992200,103.0000000,0.0000000,0.0000000,359.2470000); //object(chinatgaragedoor) (1)

CMD:gatecmdopen (playerid,params[]) {
    MoveObject(ghostgate2,1116,-713.6,99.6,2);
    return 1;}

CMD:gatecmdclose (playerid,params[]) {
    MoveObject(ghostgate2,1116,-713.6,103,2);
    return 1;}
So is this correct?
Reply
#38

Quote:
Originally Posted by AhmedWael
View Post
guys this is my script , is it right too?

Code:
CreateDynamicObject(2957,1116.0996100,-713.6992200,103.0000000,0.0000000,0.0000000,359.2470000); //object(chinatgaragedoor) (1)

CMD:gatecmdopen (playerid,params[]) {
    MoveObject(ghostgate2,1116,-713.6,99.6,2);
    return 1;}

CMD:gatecmdclose (playerid,params[]) {
    MoveObject(ghostgate2,1116,-713.6,103,2);
    return 1;}
So is this correct?
We use Y_TIMERS in my script to make gates move.

But I know, MoveObject, won't work with CreateDynamicObject. Try MoveDynamicObject
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)