If i do this , would it be buggy ? -
boelie - 17.01.2010
Hello there,
I'm making alot of pickups for health in my gamemode and i'm trying to find a efficiлnt way to make it.
So my question is, would this work what i made here? and do you know a more efficiлnt way
then please share it with me.
above ongamemodeinit;
under ongamemodeinit;
Code:
Heal = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Under Onplayerpickup;
Code:
if(pickupid == Heal) {
//SendClientMessage(playerid, 0xDEEE20FF, "you healed yourself");
SetPlayerHealth(playerid, 100.0);
}
return 1;
}
Re: If i do this , would it be buggy ? -
[HiC]TheKiller - 17.01.2010
pawn Code:
new Heal[8];
Heal[0] = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal[1] = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal[2] = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal[3] = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal[4] = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal[5] = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal[6] = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
Heal[7] = CreatePickup(1240 , 2, 2261.6921,-71.1853,31.6016, -1);
for(new S = 0; S<8; S++)
{
if(pickupid == Heal[S])
{
//SendClientMessage(playerid, 0xDEEE20FF, "you healed yourself");
SetPlayerHealth(playerid, 100.0);
}
}
Your code would make only the last one work.
Re: If i do this , would it be buggy ? -
boelie - 17.01.2010
Quote:
Your code would make only the last one work.
|
LOL yeah so i noticed that
Thanks for the help
Re: If i do this , would it be buggy ? -
MadeMan - 17.01.2010
If player picks up a heart pickup, he is automatically healed. So you don't need to use SetPlayerHealth anymore.
Re: If i do this , would it be buggy ? -
[DM]Kane - 17.01.2010
Quote:
Originally Posted by MadeMan
If player picks up a heart pickup, he is automatically healed. So you don't need to use SetPlayerHealth anymore.
|
false
Re: If i do this , would it be buggy ? -
MadeMan - 17.01.2010
Quote:
Originally Posted by [DM
Kane ]
Quote:
Originally Posted by MadeMan
If player picks up a heart pickup, he is automatically healed. So you don't need to use SetPlayerHealth anymore.
|
false
|
Lol, have you even tried it?
Re: If i do this , would it be buggy ? -
Fedee! - 17.01.2010
Quote:
Originally Posted by [DM
Kane ]
Quote:
Originally Posted by MadeMan
If player picks up a heart pickup, he is automatically healed. So you don't need to use SetPlayerHealth anymore.
|
false
|
I got in my server heal pickups and I dind add SetPlayerHealth, and works.
Re: If i do this , would it be buggy ? -
[DM]Kane - 17.01.2010
Quote:
Originally Posted by Fedee!
Quote:
Originally Posted by [DM
Kane ]
Quote:
Originally Posted by MadeMan
If player picks up a heart pickup, he is automatically healed. So you don't need to use SetPlayerHealth anymore.
|
false
|
I got in my server heal pickups and I dind add SetPlayerHealth, and works.
|
Lol sorry, didnt tried it in 0.3
Re: If i do this , would it be buggy ? -
Fedee! - 17.01.2010
Quote:
Originally Posted by [DM
Kane ]
Quote:
Originally Posted by Fedee!
Quote:
Originally Posted by [DM
Kane ]
Quote:
Originally Posted by MadeMan
If player picks up a heart pickup, he is automatically healed. So you don't need to use SetPlayerHealth anymore.
|
false
|
I got in my server heal pickups and I dind add SetPlayerHealth, and works.
|
Well, if im not wrong, in 0.2 also works without that.
Lol sorry, didnt tried it in 0.3
|
Re: If i do this , would it be buggy ? -
Fedee! - 17.01.2010
Quote:
Originally Posted by Fedee!
Quote:
Originally Posted by [DM
Kane ]
Quote:
Originally Posted by Fedee!
Quote:
Originally Posted by [DM
Kane ]
Quote:
Originally Posted by MadeMan
If player picks up a heart pickup, he is automatically healed. So you don't need to use SetPlayerHealth anymore.
|
false
|
I got in my server heal pickups and I dind add SetPlayerHealth, and works.
|
Lol sorry, didnt tried it in 0.3
|
|
Well, if im not wrong, in 0.2 also works without that.