[FilterScript] Enter Shamal as passenger. (v3.1 13th May 2017)
#1

13th May 2017: 3.1 released . A couple of code optimizations / bug fixes.

------------------------------------------------------------

27th April 2014: 3.01 released . When you exit a Shamal it will now check the Shamals virtual world and set your world to that world (some gamemodes might have Shamals in different virtual worlds).

------------------------------------------------------------

26th April 2014: 3.0 released . 5 years later. SA-MP 0.3z R2-2 server has been released, bringing with it CreateExplosionForPlayer. This means that each Shamal no longer needs its own interior. Using virtual worlds and per-player explosions I bring you v3.0. Less code, no objects, same great effect (if not better).

------------------------------------------------------------

24th August 2009: 2.12 released . Fixed an error causing players to crash when entering a Shamal.

------------------------------------------------------------

30th October 2008: 2.11 released . The script will check that objects are within the limit before creating more.

------------------------------------------------------------

10th October 2008: 2.1 released - Edited a lot the code and added pastebin download.

------------------------------------------------------------

Updated: Version 2.0. This version will now give each Shamal its own interior and when you enter a Shamal it will take you to that interior, so other people in a different Shamal as passenger will be in a different interior.
When the actual Shamal vehicle blows up explosions will also take place in the interior of that Shamal. They will stop when the Shamal respawns and start again when it is next destroyed.

Note: The interiors obviously require objects for each, so as long as you don't have too many Shamals and/or too many objects already you should be fine .

------------------------------------------------------------

Well its basically like what you have seen in Partyserver, although I haven't seen it I have heard about it so I made a filterscript for it, just put the amx in your filterscripts folder and add shamal to your filterscripts line in your server config file. Although this isn't a huge gamemode its a nice little script that I've got here so although you don't have to give me credit, don't give yourself it !

HowToEnter?: Just press g at the Shamal like you would for a normal vehicle and you will enter the Shamals interior.

HowToExit?: Press the normal exit button for a vehicle and you will reappear at the passenger door outside the Shamal.

Basically it works the same as a normal vehicle only you are inside the Shamals interior, oh and the passenger amount is unlimited.


Download 3.1 (recommended)-
Download 3.1 (pastebin.com).


Download 2.12 -
Download 2.12 (pastebin.com).


Cheers. Martin (BeckzyBoi)
Reply
#2

i like this..ALOT! Thx!
Reply
#3

Cool man!!!!
Reply
#4

Nice work
Reply
#5

Thanks thanks thanks a lot !
Reply
#6

thanks great script man, hey can you make one with the andromada, theres an interior for andromada
Reply
#7

Quote:
Originally Posted by vAx1OnE
thanks great script man, hey can you make one with the andromada, theres an interior for andromada
No the Andromada natively has 2 seats that you can go to and get in and out of without any code although i can see your point about the coincidence of the Andromada also having a suitable interior.
Reply
#8

I was hoping something like that will be released. Thanks a lot.
Reply
#9

I like it alot, heres some more ideas/notes if you wanna work on it, Im trying but havign a little trouble...
1. it seems like its hard to get in some times,
2. my friend got in while i was driving and he did not disapear from outside.
3. my friend got out and i did not see him appear at all.
4. if it blows up they dont die
5. should add a parashoot spawn in it
6. there should be like a block so the passengers cant get neat the cockpit, that way they cant see there is no driver in it
7. Need to stop respawning if some one is inside

--Glitch--
I was flying, got out and hit g to get in back, then got out again and the plane fell, i hit g to get back in, and then when i exited, i was in the air again, but the plane was still on the ground...
Reply
#10

cool , thx , can somehow you make fs for andromada (secret plane) to get passangers into it ?
Reply
#11

I like it alot, heres some more ideas/notes if you wanna work on it, Im trying but havign a little trouble...
1. it seems like its hard to get in some times, // it runs though OnPlayerEnterVehicle, just be as close to the passenger door as possible.
2. my friend got in while i was driving and he did not disapear from outside. // That is the SA:MP SetPlayerPos bug.
3. my friend got out and i did not see him appear at all. // That is something you are doing wrong then, note if you are flying chances are you wont see him as he will fall to death before you get the chance.
4. if it blows up they dont die // It isn't meant to, if you want it to do so then use CreateExplosion in OnVehicleDeath and create it in the interior.
5. should add a parashoot spawn in it // Can't you do that?
6. there should be like a block so the passengers cant get neat the cockpit, that way they cant see there is no driver in it // Do that yourself using CreateObject.
7. Need to stop respawning if some one is inside // I can't do anything about that, they will respawn if nobody is driving it. Use AddStaticVehicleEx and make the time a lot longer.

--Glitch--
I was flying, got out and hit g to get in back, then got out again and the plane fell, i hit g to get back in, and then when i exited, i was in the air again, but the plane was still on the ground... // SA:MP bug also, GetVehiclePos will always return the last position of where the place was in use. Not if it had fell, rolled, been pushed etc.
Reply
#12

Quote:
Originally Posted by BeckzyBoi
I like it alot, heres some more ideas/notes if you wanna work on it, Im trying but havign a little trouble...
1. it seems like its hard to get in some times, // it runs though OnPlayerEnterVehicle, just be as close to the passenger door as possible.
2. my friend got in while i was driving and he did not disapear from outside. // That is the SA:MP SetPlayerPos bug.
3. my friend got out and i did not see him appear at all. // That is something you are doing wrong then, note if you are flying chances are you wont see him as he will fall to death before you get the chance.
4. if it blows up they dont die // It isn't meant to, if you want it to do so then use CreateExplosion in OnVehicleDeath and create it in the interior.
5. should add a parashoot spawn in it // Can't you do that?
6. there should be like a block so the passengers cant get neat the cockpit, that way they cant see there is no driver in it // Do that yourself using CreateObject.
7. Need to stop respawning if some one is inside // I can't do anything about that, they will respawn if nobody is driving it. Use AddStaticVehicleEx and make the time a lot longer.

--Glitch--
I was flying, got out and hit g to get in back, then got out again and the plane fell, i hit g to get back in, and then when i exited, i was in the air again, but the plane was still on the ground... // SA:MP bug also, GetVehiclePos will always return the last position of where the place was in use. Not if it had fell, rolled, been pushed etc.
1. figured that out
2. i c...
3. yea i was flying lol...
4. trying like hell but still no explosion....
5. AddStaticPickup(371,2,1.716518,31.8657,1199.593750 );
6. done, but kinda ghetto...
7. i guess i will increase its timer...

now im working on the andromada one cause i still cant get this ones explosion to work
Reply
#13

Nice job. Just 1 thing, what does the & in this statement mean? Pawn-lang.pdf says bitwise logical
pawn Код:
newkeys & 16
And what if the Shamal's vehicleid was 0.
pawn Код:
InShamal[playerid]=vehicleid;

InShamal[playerid] > 0
Reply
#14

Quote:
Originally Posted by Malice
Nice job. Just 1 thing, what does the & in this statement mean? Pawn-lang.pdf says bitwise logical
pawn Код:
newkeys & 16
And what if the Shamal's vehicleid was 0.
pawn Код:
InShamal[playerid]=vehicleid;

InShamal[playerid] > 0
1) It makes sure the player is ONLY pressing key 16 and not key 16 with other keys.
2) There is no such vehicle id as nothing, they start from 1.
Reply
#15

Was going to post something like this, but meh
Reply
#16

#1 Ah, I see.
#2 Really? I always though they started from 0.
#3 Thanks for explaining.
#4 Why not '==' ?
Reply
#17

Quote:
Originally Posted by Malice
#1 Ah, I see.
#2 Really? I always though they started from 0.
#3 Thanks for explaining.
#4 Why not '==' ?
1) Good.
2) Vehicles and Objects have always started from 1.
3) Np.
4) I just told you -_-, == would indeed check if the player is pressing the key you want but the player could also be pressing others. If it means so much to you to have == even though most would prefer & then you do so.
Reply
#18

So much for learning.
Reply
#19

wow this is ingenious, but i know your probably going to say no but im going to try anyway, i was wondering if you could make a v2 or something, where there would be an explosion in the interior of the aircraft when the vehicle 'dies' along the whole corridor to make sure they die. I know you'll probably say do it myself and thats what i tried to do and i studied those wiki pages for hours trying to figure out how to get it working. But i think ive got a basic understanding of how it works but no idea on how to make anything happen.

The second thing is i was wondering if you could make it play like music inside the interior(something like the music you hear at the spawn locations on different servers) now i've studied this a bit and this looks a little in my range so i think i can accomplish this, but if you get to this first and complete it please let me know so i can yeah... lol, well anyway man beautiful filterscript and you are certainly talented
peace
Reply
#20

Quote:
Originally Posted by Azteca
wow this is ingenious, but i know your probably going to say no but im going to try anyway, i was wondering if you could make a v2 or something, where there would be an explosion in the interior of the aircraft when the vehicle 'dies' along the whole corridor to make sure they die. I know you'll probably say do it myself and thats what i tried to do and i studied those wiki pages for hours trying to figure out how to get it working. But i think ive got a basic understanding of how it works but no idea on how to make anything happen.

The second thing is i was wondering if you could make it play like music inside the interior(something like the music you hear at the spawn locations on different servers) now i've studied this a bit and this looks a little in my range so i think i can accomplish this, but if you get to this first and complete it please let me know so i can yeah... lol, well anyway man beautiful filterscript and you are certainly talented
peace
hmm you sound like you are around my lvl of coding, i could probably do the music and ive also tried for awhile but cannot get it to explode when it dies or w/e....
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)