05.02.2012, 15:53
I know you're finished now, but I wanna give you a little tip:
Change this:
To this:
Sometimes, it may confuse the server, and also, else-if would be better at this place...
'Cause I heard bad experience about forgetting the else-if and taking instead only if!!
Change this:
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == PICKUP_HEALTH)
{
return 1;
}
if(pickupid == PICKUP_ARMOR)
{
return 1;
}
if(pickupid == PICKUP_SHOTGUN)
{
GameTextForPlayer(playerid, "~w~You Picked up the ShotGun", 5000, 5);
GivePlayerWeapon(playerid,27,500);
return 1;
}
return 1;
}
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == PICKUP_HEALTH)
{
return 1;
}
else if(pickupid == PICKUP_ARMOR)
{
return 1;
}
else if(pickupid == PICKUP_SHOTGUN)
{
GameTextForPlayer(playerid, "~w~You Picked up the ShotGun", 5000, 5);
GivePlayerWeapon(playerid,27,500);
return 1;
}
return 1;
}

'Cause I heard bad experience about forgetting the else-if and taking instead only if!!