25.09.2012, 23:27
Quando eu passo na Pickup EntraAmmu1Fora eu ganoh o valor da pickup PickupGrana..
pawn Код:
// Interiores
new EntraAmmu1Fora; //Pickup
new SaidaAmmu1Fora; //Pickup
new PickupGrana;
EntraAmmu1Fora = CreatePickup(1318,1,-1990.7518,885.4659,45.6437,-1);
SaidaAmmu1Fora = CreatePickup(1318,1,286.1448,-41.6659,1001.5156,-1);
OnPlayerDeath ..
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
PickupGrana = CreatePickup(1212,2,x,y,z,-1);
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == PickupGrana)
{
GivePlayerMoney(playerid,1000);
DestroyPickup(pickupid);
return 1;
}
if(pickupid == EntraAmmu1Fora) // QUANDO EU PASSO NESSA E GANHO 1.000 DA DE CIMA ..
{
SetPlayerPos(playerid,286.148986,-40.644397,1001.515625);
SetPlayerInterior(playerid,1);
return 1;
}
if(pickupid == SaidaAmmu1Fora)
{
SetPlayerPos(playerid,-1991.6077,884.9892,45.4288);
SetPlayerInterior(playerid,0);
return 1;
}
return 1;
}