15.02.2014, 15:37
Galera nгo sei oque estб acontecendo mais quando eu passo em uma pickup, executa a funзгo de outra.. e por ai vai..
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
//=========================[ MUDAR SKIN POLICIA ]===========================
if(pickupid == SkinPolicia)
{
if(GetPlayerTeam(playerid) != TEAM_POLICIA)
{
return 0;
}
else
{
SetPlayerSkin(playerid,284);
}
}
//=======================[ DROP DE GRANA AO MORRER ]========================
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(pickupid == moneyPickup[i])
{
GivePlayerMoney(playerid, 500);
DestroyPickup(moneyPickup[i]);
return 1;
}
}
// =======================[ LOJAS E AMMUNATIONS ]===========================
// [ LOJA DE ARMAS 1 ] :
if(pickupid == PickupLAE)
{
SetPlayerVirtualWorld(playerid,1);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,286.800994,-82.547599,1001.515625);
return 1;
}
if(pickupid == PickupLAS)
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-1817.7803,391.9699,17.2381);
SetPlayerFacingAngle(playerid,140.0172);
return 1;
}
// [ LOJA DE COMIDAS 1 ] :
if(pickupid == PickupLCE)
{
SetPlayerVirtualWorld(playerid,1);
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,367.2297,-73.2760,1001.5078);
SetPlayerFacingAngle(playerid,298.6266);
return 1;
}
if(pickupid == PickupLCS)
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-1910.4512,830.4787,35.1719);
SetPlayerFacingAngle(playerid,319.3367);
return 1;
}
return 1;
}