SA-MP Forums Archive
Pickups problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pickups problem (/showthread.php?tid=191067)



Pickups problem - marinov - 17.11.2010

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid==pickup)
    {
        SetPlayerInterior(playerid, 12);
        SetPlayerPos(playerid, 2324.419921,-1145.568359,1050.710083);
    }
    if(pickupid==pickup2) //this pickup is inside the interior, I'm making it like a exit
    {
        SetPlayerPos(playerid, 265.23, 2895.79, 9.26);
    }
    if(pickupid == WeapPickup)
    {
        if(team[playerid] != 2)
        {
            GivePlayerWeapon(playerid, wep1, ammo1-10); // -10 because the Pickup has got standard 10 ammo
            DestroyPickup(WeapPickup); // if one player pick up the weapon the Pickup will be destroyed for all players
        }
        else
        {
            ResetPlayerWeapons(playerid);
            SendClientMessage(playerid,YELLOW, "You do not know how to use that.");//zombies can't pick weapons up
        }
    }
    return 1;
}

when a player goes on pickup2 it sends him to those bugged places (all dark, no objects, worlds, etc...). What's wrong ?


Re: Pickups problem - Grim_ - 17.11.2010

Since you are making it like an exit, make sure to set the player's interior (and virtual world if applicable) to the default (0). Setting him in a regular position with a different interior will cause that 'bug'.

This forum requires that you wait 120 seconds between posts. Please try again in 23 seconds.


Re: Pickups problem - marinov - 17.11.2010

will try bro thx


Re: Pickups problem - marinov - 17.11.2010

it worked bro, I though that for the exit i didn't need to put this :
pawn Код:
SetPlayerInterior(playerid, 0);
thxx


Re: Pickups problem - dark_clown - 17.11.2010

Quote:
Originally Posted by marinov
Посмотреть сообщение
it worked bro, I though that for the exit i didn't need to put this :
pawn Код:
SetPlayerInterior(playerid, 0);
thxx
lol ofc u do


Re: Pickups problem - marinov - 17.11.2010

I learned something today

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 42 seconds.