Author Topic: Prop Spawn  (Read 5202 times)

0 Members and 1 Guest are viewing this topic.

yazeen

  • Guest
Prop Spawn
« on: March 27, 2011, 05:27:48 pm »
can u write Cord for a propspawn system please  ::)   ::)   ::)  ::)  ::)  ::)   ::)   ::)

Offline tato

  • Made Man
  • ***
  • Posts: 106
  • I bet u don't know me!
    • View Profile
    • EA Server
Re: Prop Spawn
« Reply #1 on: March 27, 2011, 07:13:12 pm »
i will try......

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: Prop Spawn
« Reply #2 on: March 28, 2011, 01:22:59 pm »
and what about prop heal

Offline cycu

  • VC:MP Beta Tester
  • Street Thug
  • *
  • Posts: 19
    • View Profile
Re: Prop Spawn
« Reply #3 on: March 28, 2011, 01: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.

yazeen

  • Guest
Re: Prop Spawn
« Reply #4 on: March 28, 2011, 02:04:24 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

Offline cycu

  • VC:MP Beta Tester
  • Street Thug
  • *
  • Posts: 19
    • View Profile
Re: Prop Spawn
« Reply #5 on: March 28, 2011, 02:43:11 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:

Code: [Select]
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:

Code: [Select]
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:
Code: [Select]
SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
Code: [Select]
SpawnPlayer(playerid)
However you could try with timers, but it won't work either because you need
Code: [Select]
SetTimerEx function which is obviously not added yet...

So at the moment it's not possible.
« Last Edit: March 28, 2011, 02:44:56 pm by cycu »

Offline tato

  • Made Man
  • ***
  • Posts: 106
  • I bet u don't know me!
    • View Profile
    • EA Server
Re: Prop Spawn
« Reply #6 on: March 29, 2011, 04:10:04 am »
prop heal is kind of easy....

yazeen

  • Guest
Re: Prop Spawn
« Reply #7 on: March 29, 2011, 07:02:18 am »
Code: [Select]
And what this function will do is that it will check the prop ID which player owns and send him to right spawnI use
Code: [Select]
IsThatHisProperty

Offline cycu

  • VC:MP Beta Tester
  • Street Thug
  • *
  • Posts: 19
    • View Profile
Re: Prop Spawn
« Reply #8 on: March 29, 2011, 11:57:30 am »
Code: [Select]
And what this function will do is that it will check the prop ID which player owns and send him to right spawnI use
Code: [Select]
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)

« Last Edit: March 29, 2011, 01:18:33 pm by cycu »

yazeen

  • Guest
Re: Prop Spawn
« Reply #9 on: March 29, 2011, 12:08:12 pm »
Code: [Select]
And what this function will do is that it will check the prop ID which player owns and send him to right spawnI use
Code: [Select]
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

Offline tato

  • Made Man
  • ***
  • Posts: 106
  • I bet u don't know me!
    • View Profile
    • EA Server
Re: Prop Spawn
« Reply #10 on: March 30, 2011, 05:41:21 am »
Code: [Select]
And what this function will do is that it will check the prop ID which player owns and send him to right spawnI use
Code: [Select]
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