SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 28/07/2007, 11:54 AM   #21
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,683
Reputation: 124
Default Re: [FS] Enter shamal as passenger.

@ Azteca. I am not going to add that into the script as not everybody wants it but i will show you how to do it and you can edit it.

Code:
public OnVehicleDeath(vehicleid, killerid)
{
if (GetVehicleModel(vehicleid) == 519)
{
new inside;
for (new a = 0; a < MAX_PLAYERS; a++)
{
  if (IsPlayerConnected(a) && InShamal[a] > 0)
  {
    inside ++;
  }
}
  if (inside)
  {
    CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius);
  }
}
return 1;
}

The music is simple, in my code under OnPlayerEnterVehicle just use

Code:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, soundid, X,Y,Z);

Make sure you put that AFTER the player's position has been set so it plays the sound for the player at the new position and around that area.
__________________
BeckzyBoi is offline   Reply With Quote
Old 28/07/2007, 12:11 PM   #22
Azteca
Little Clucker
 
Join Date: Jun 2007
Posts: 26
Reputation: 0
Default Re: [FS] Enter shamal as passenger.

@BeckzyBoi

First thanks very much for the help but im still not a little too sure on the actual thing
*removed*
Azteca is offline   Reply With Quote
Old 28/07/2007, 12:17 PM   #23
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,683
Reputation: 124
Default Re: [FS] Enter shamal as passenger.

Yeah it looks okay to me but now please edit your post and remove all that code as it comes with the filterscript not a snippet to help noobs.
__________________
BeckzyBoi is offline   Reply With Quote
Old 28/07/2007, 12:28 PM   #24
Azteca
Little Clucker
 
Join Date: Jun 2007
Posts: 26
Reputation: 0
Default Re: [FS] Enter shamal as passenger.

ok so i removed it, and everything i just pasted when i try and complie it i get this

C:\Program Files\Downloads\samp-server-0.2.1r2-win32\filterscripts\shamal22.pwn(41) : warning 217: loose indentation
C:\Program Files\Downloads\samp-server-0.2.1r2-win32\filterscripts\shamal22.pwn(43) : error 017: undefined symbol "X"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Or was i meant to include the coordinates of the plane or something cause im really not sure lol but thanks so far anyway
Azteca is offline   Reply With Quote
Old 28/07/2007, 12:34 PM   #25
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,683
Reputation: 124
Default Re: [FS] Enter shamal as passenger.

The X,Y,Z, type, radius in CreateExplosion were for you to replace with the coordniates of where to explodem the type of explosion and the radius. The X,Y,Z will be the coordniates from the middle area of the interior, i don't know the types of explosions as i have never needed to use that and a radius of about 15.0 would be aout right. About the loose indentation that is just a warning and wont effect the compiling of the script. If you want to get rid of it then just indent what needs indenting.
__________________
BeckzyBoi is offline   Reply With Quote
Old 28/07/2007, 12:46 PM   #26
Azteca
Little Clucker
 
Join Date: Jun 2007
Posts: 26
Reputation: 0
Default Re: [FS] Enter shamal as passenger.

Ok i just tried it then and everything works, the music explosion when the plane explodes, only thing is when you get out from the plane the music continues... lol so ill need to change that, and to change to a more powerful/weaker explosion is that the type of explosion or radius?
Azteca is offline   Reply With Quote
Old 28/07/2007, 01:43 PM   #27
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,683
Reputation: 124
Default Re: [FS] Enter shamal as passenger.

Quote:
Originally Posted by Azteca
Ok i just tried it then and everything works, the music explosion when the plane explodes, only thing is when you get out from the plane the music continues... lol so ill need to change that, and to change to a more powerful/weaker explosion is that the type of explosion or radius?
About the music do exactly the same for when getting out AFTER its set the players position but instead change the sound id to a one that stops the music and just mess about with explosion types and radius.
__________________
BeckzyBoi is offline   Reply With Quote
Old 28/07/2007, 03:54 PM   #28
Spilot
Big Clucker
 
Join Date: Jun 2007
Posts: 124
Reputation: 1
Default Re: [FS] Enter shamal as passenger.

i download it but when i try to open with WinRAR it says that the File Is Damaged or either Unknown Files !
Spilot is offline   Reply With Quote
Old 28/07/2007, 07:52 PM   #29
dracar
Big Clucker
 
Join Date: Jan 2007
Posts: 52
Reputation: 0
Default Re: [FS] Enter shamal as passenger.

Can some one explain to me what this part is for? It seems like you made an int and increase it whenever if finds a player inside the plane, but then you checked if inside was valid? isnt this line "if (inside)" somehting you would use to check a boolean, mot an int?
Code:
  if (IsPlayerConnected(a) && InShamal[a] > 0)
  {
    inside ++;
  }
}
  if (inside)
  {
    CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius);
  }
dracar is offline   Reply With Quote
Old 28/07/2007, 07:58 PM   #30
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,683
Reputation: 124
Default Re: [FS] Enter shamal as passenger.

Quote:
Originally Posted by dracar
Can some one explain to me what this part is for? It seems like you made an int and increase it whenever if finds a player inside the plane, but then you checked if inside was valid? isnt this line "if (inside)" somehting you would use to check a boolean, mot an int?
Code:
  if (IsPlayerConnected(a) && InShamal[a] > 0)
  {
    inside ++;
  }
}
  if (inside)
  {
    CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius);
  }
Because when the shamal blows up if nobody is in the interior why create an explosion in the interior? So it checks if inside is true and if it is then it will create the explosion. And why the hell use a bool for something as simple and very straight forward as that?
__________________
BeckzyBoi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter as passenger. ScIrUsna Scripting Help 0 29/04/2016 06:23 PM
How to have players enter as a passanger in a Shamal and Andromeda? DesertFoxNight Help Archive 3 01/03/2010 05:23 PM
[NPC] SA Pilot **Revamped** (Enter the Shamal!) V1ceC1ty Help Archive 22 15/01/2010 04:21 PM
[SOLVED] shamal enter crashes troy52192 Help Archive 0 28/11/2009 06:15 AM


All times are GMT. The time now is 01:29 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.