18.07.2014, 03:12
I HAVE EDITED THIS:
This should fix your unreachable code problem
And then:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == armourpickup)
{
SetPlayerArmour(playerid, 100);
GameTextForPlayer(playerid, "ARMOR NAPUNJEN!", 3000, 5);
}
// removed return 1;
else if(pickupid == zatvorpickup)
{
GameTextForPlayer(playerid, "Zatvor (/enter)", 3000, 4);
}
// removed return 1;
if(pickupid == enterpickup)
{
GameTextForPlayer(playerid, "Koristi /enter da udjes", 3000, 4);
}
return 1; // Removed return 1;, then added it back because this should return a value
}
And then:
pawn Код:
CMD:enter(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 1554.7246,-1675.5688,16.1953))//PD
{
SetPlayerPos(playerid, 246.40,110.84,1003.22);
SetPlayerInterior(playerid, 6); // Make sure this interior ID is right! LSPD = 6, LVPD = 3, SFPD = 10
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 1455.1255,-1010.9031,26.8438))//BANK
{
SetPlayerPos(playerid, 2315.952880,-1.618174,26.742187);
SetPlayerInterior(playerid, 0); // This interior ID for the palomino bank is correct.
}
return 1;
}
//If it's still showing up Gray, then the coordinates are wrong.
CMD:exit(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 246.40,110.84,1003.22)) //PD
{
SetPlayerPos(playerid, 1554.7246,-1675.5688,16.1953);
SetPlayerInterior(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 2315.952880,-1.618174,26.742187)) //BANK
{
SetPlayerPos(playerid, 1455.1255,-1010.9031,26.8438);
SetPlayerInterior(playerid, 0);
}
return 1;
}