Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: yazeen on March 27, 2011, 04:27:48 PM

Title: Prop Spawn
Post by: yazeen on March 27, 2011, 04:27:48 PM
can u write Cord for a propspawn system please  ::)   ::)   ::)  ::)  ::)  ::)   ::)   ::)
Title: Re: Prop Spawn
Post by: tato on March 27, 2011, 06:13:12 PM
i will try......
Title: Re: Prop Spawn
Post by: Scripter on March 28, 2011, 12:22:59 PM
and what about prop heal
Title: Re: Prop Spawn
Post by: cycu on March 28, 2011, 12:54:12 PM
What you mean by prop spawn ? i don't get it so I'm not able to help you before i know what it is.
Title: Re: Prop Spawn
Post by: yazeen on March 28, 2011, 01:04:24 PM
Quote from: cycu on March 28, 2011, 12:54:12 PM
What you mean by prop spawn ? i don't get it so I'm not able to help you before i know what it is.

Propspawn Means if the property is owned then he can spawn at his property!

example : my property malibu

i enable propspawn and i spawn at malibu with any skin
Title: Re: Prop Spawn
Post by: cycu on March 28, 2011, 01:43:11 PM
Quote from: yazeen on March 28, 2011, 01:04:24 PM
Quote from: cycu on March 28, 2011, 12:54:12 PM
What you mean by prop spawn ? i don't get it so I'm not able to help you before i know what it is.

Propspawn Means if the property is owned then he can spawn at his property!

example : my property malibu

i enable propspawn and i spawn at malibu with any skin

Well this is quite simple, in OnPlayerSpawn you check if player owns property
If yes then you need Function e.g:

SetPlayerPropSpawn(playerid);

And what this function will do is that it will check the prop ID which player owns and send him to right spawn.

Basic Example:

public SetPlayerPropSpawn(playerid)
{
if(PlayerProp[playerid] == 1)
{
   SetPlayerPos(playerid,x,y,z,r,inter);
}
else if(PlayerProp[playerid] == 1)
{
   SetPlayerPos(playerid,x,y,z,r,inter);
}
}


Now this can't be done at the moment because, 2 really useful functions are missing:
SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)

SpawnPlayer(playerid)

However you could try with timers, but it won't work either because you need SetTimerEx function which is obviously not added yet...

So at the moment it's not possible.
Title: Re: Prop Spawn
Post by: tato on March 29, 2011, 03:10:04 AM
prop heal is kind of easy....
Title: Re: Prop Spawn
Post by: yazeen on March 29, 2011, 06:02:18 AM
And what this function will do is that it will check the prop ID which player owns and send him to right spawn
I use
IsThatHisProperty
Title: Re: Prop Spawn
Post by: cycu on March 29, 2011, 10:57:30 AM
Quote from: yazeen on March 29, 2011, 06:02:18 AM
And what this function will do is that it will check the prop ID which player owns and send him to right spawn
I use
IsThatHisProperty

Sure that's fine i showed you only an example, it's up to you what name you will call it.

However i think you get the point ?

While player is spawning you have to check his Property ID and as mentioned above, use 'IsThatHisProperty' function to assign right spawn.

But! if you put this in OnPlayerSpawn the player will be bugged(Player can't shoot, enter cars) and the only solution for this is to jump once, but in the end it will be something like this: "What the hell is going on I'm bugged this server sucks"

I think the reason for this bug is because in on GameModeInit you have different spawn pos (AddPlayerClass/AddPlayerClassEx)
then in 'IsThatHisProperty' kind functions where SetPlayerPos is used which leads to this bug.

You can try to use SetTimer - so the function will be called e.g 700 milliseconds after spawn.

I will create tutorial later today called: 'Making your way around because there is no SetTimerEx function...'

8)

Title: Re: Prop Spawn
Post by: yazeen on March 29, 2011, 11:08:12 AM
Quote from: cycu on March 29, 2011, 10:57:30 AM
Quote from: yazeen on March 29, 2011, 06:02:18 AM
And what this function will do is that it will check the prop ID which player owns and send him to right spawn
I use
IsThatHisProperty

Sure that's fine i showed you only an example, it's up to you what name you will call it.

However i think you get the point ?

While player is spawning you have to check his Property ID and as mentioned above, use 'IsThatHisProperty' function to assign right spawn.

But! if you put this in OnPlayerSpawn the player will be bugged(Player can't shoot, enter cars) and the only solution for this is to jump once, but in the end it will be something like this: "What the hell is going on I'm bugged this server sucks"

I think the reason for this bug is because in on GameModeInit you have different spawn pos (AddPlayerClass/AddPlayerClassEx)
then in 'IsThatHisProperty' kind functions where SetPlayerPos is used which leads to this bug.

You can try to use SetTimer - so the function will be called e.g 700 milliseconds after spawn.

I will do tutorial on making on way around 'Making your way around because there is no SetTimerEx function...'

8)



Thx a lot Dude  8) YOu Help me in everytopic Give others a chance lol
Title: Re: Prop Spawn
Post by: tato on March 30, 2011, 04:41:21 AM
Quote from: yazeen on March 29, 2011, 11:08:12 AM
Quote from: cycu on March 29, 2011, 10:57:30 AM
Quote from: yazeen on March 29, 2011, 06:02:18 AM
And what this function will do is that it will check the prop ID which player owns and send him to right spawn
I use
IsThatHisProperty

Sure that's fine i showed you only an example, it's up to you what name you will call it.

However i think you get the point ?

While player is spawning you have to check his Property ID and as mentioned above, use 'IsThatHisProperty' function to assign right spawn.

But! if you put this in OnPlayerSpawn the player will be bugged(Player can't shoot, enter cars) and the only solution for this is to jump once, but in the end it will be something like this: "What the hell is going on I'm bugged this server sucks"

I think the reason for this bug is because in on GameModeInit you have different spawn pos (AddPlayerClass/AddPlayerClassEx)
then in 'IsThatHisProperty' kind functions where SetPlayerPos is used which leads to this bug.

You can try to use SetTimer - so the function will be called e.g 700 milliseconds after spawn.

I will do tutorial on making on way around 'Making your way around because there is no SetTimerEx function...'

8)



Thx a lot Dude  8) YOu Help me in everytopic Give others a chance lol
8 :-X