Posts: 183
Threads: 33
Joined: Aug 2015
Reputation:
0
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Sniper_Pickup)
{
GivePlayerWeapon(playerid, 34, 20);
}
if(pickupid == SD_Pickup)
{
GivePlayerWeapon(playerid, 23,100);
}
if(pickupid == Health_Pickup)
{
SetPlayerHealth(playerid, 100);
}
if(pickupid == Armor_Pickup)
{
SetPlayerArmour(playerid, 100);
}
} I created some pickups but this script only works for 1 of each of these pickups, how do i make it work for all of them.
Posts: 1,206
Threads: 39
Joined: Feb 2014
Reputation:
0
Don't bump your topic in less than 24 hours since the last post.
O.T.: Elaborate. What exactly is the problem? You can only pick one of them up? You can only pick them up once?
Please put your code in between a pair of php tags in future posts: [PHP ] [/PHP]
Posts: 183
Threads: 33
Joined: Aug 2015
Reputation:
0
I have a code that when I pickup a pickup its suppose to do something like set my health to 100, but when I go ingame to test it, it only works on 1 of my pickups when I 3, so I created a health pickup and that when I get it it gives me 100 health, I have 3 of the health pickups but it only works on 1 of them
Posts: 308
Threads: 10
Joined: Oct 2014
Reputation:
0
Show the code where you defined and created the pickups.
Posts: 183
Threads: 33
Joined: Aug 2015
Reputation:
0
[PHP ]Health_Pickup = CreatePickup(1240, 19, -2744.5020,3911.6094,21.3751,-1);//Health
Health_Pickup = CreatePickup(1240, 19, -2912.6404,3862.3818,32.3423,-1);//Health
Health_Pickup = CreatePickup(1240, 19, -2913.2795,3626.6135,55.6418,-1);//Health
[/PHP]
[PHP ]
new Health_Pickup;[/PHP] this is it
Posts: 183
Threads: 33
Joined: Aug 2015
Reputation:
0
Thats not the problem, when I get the pickup it heals me but only one of the hearts heal me but the others don't, so i wanna know how do I spread it to all of them so when I pick any health hearts I get health from all of them instead of 1