• Welcome to Vice City Multiplayer.
 

Prop Spawn

Started by yazeen, March 27, 2011, 03:27:48 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

yazeen

can u write Cord for a propspawn system please  ::)   ::)   ::)  ::)  ::)  ::)   ::)   ::)

tato






<!-- Facebook Badge START --><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" style="font-family: &quot;lucida grande&quot;,tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Eduardo Estrada">Eduardo Estrada</a><br/><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" title="Eduardo Estrada"><img src="http://badge.facebook.com/badge/697470158.6069.1979465113.png" width="120" height="272" style="b

Scripter

and what about prop heal

cycu

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.

yazeen

Quote from: cycu on March 28, 2011, 11:54:12 AM
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

cycu

#5
Quote from: yazeen on March 28, 2011, 12:04:24 PM
Quote from: cycu on March 28, 2011, 11:54:12 AM
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.

tato

prop heal is kind of easy....





<!-- Facebook Badge START --><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" style="font-family: &quot;lucida grande&quot;,tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Eduardo Estrada">Eduardo Estrada</a><br/><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" title="Eduardo Estrada"><img src="http://badge.facebook.com/badge/697470158.6069.1979465113.png" width="120" height="272" style="b

yazeen

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

cycu

#8
Quote from: yazeen on March 29, 2011, 05: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)


yazeen

Quote from: cycu on March 29, 2011, 09:57:30 AM
Quote from: yazeen on March 29, 2011, 05: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

tato

Quote from: yazeen on March 29, 2011, 10:08:12 AM
Quote from: cycu on March 29, 2011, 09:57:30 AM
Quote from: yazeen on March 29, 2011, 05: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





<!-- Facebook Badge START --><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" style="font-family: &quot;lucida grande&quot;,tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Eduardo Estrada">Eduardo Estrada</a><br/><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" title="Eduardo Estrada"><img src="http://badge.facebook.com/badge/697470158.6069.1979465113.png" width="120" height="272" style="b