04.06.2011, 15:17
bem, eu vim aqui pedir um fs que quando matemos um gajo, as armas e a vida prai 50hp fique no chгo alguem me pode arranjar um sistema desses! weapondrop ja tenho mas healt drop nao, agradecia se alguem me desse.
new pickup[50];
new pick;
public OnPlayerDeath(playerid,killerid,reason)
{
new Float:XYZ[3];
GetPlayerPos(playerid,XYZ[0],XYZ[1],XYZ[2]);
pickup[pick+1] = CreatePickup(1240,5,XYZ[0],XYZ[1],XYZ[2]-1,GetPlayerVirtualWorld(playerid));
pick++;
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new i = 0; i < sizeof(pickup); i++)
{
if(pickupid == pickup[i])
{
new Float:Vida;
GetPlayerHealth(playerid, Vida);
SetPlayerHealth(playerid, Vida+30);
DestroyPickup(i);
pick--;
return 1;
}
}
return 1;
}
SetPlayerHealth(playerid, Vida+30); //TROQUE O 30 POR 50