SA-MP Forums Archive
Pickup teleport - 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: Pickup teleport (/showthread.php?tid=236239)



Pickup teleport - wheelman_WM - 07.03.2011

Hello
I Want to make a weapon pickup (Minigun) and when a player picks it it will be teleport to a place.



Respuesta: Pickup teleport - TheChaoz - 07.03.2011

pawn Код:
new MyPckup;

public OnGameModeInit()
{
    MyPckup = CreatePickup(...);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == MyPckup){
        SetPlayerPos(...);
        GivePlayerWeapon(...);
    }
    return 1;
}
hope it helps


Re: Respuesta: Pickup teleport - wheelman_WM - 07.03.2011

Quote:
Originally Posted by the_chaoz
Посмотреть сообщение
pawn Код:
new MyPckup;

public OnGameModeInit()
{
    MyPckup = CreatePickup(...);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == MyPckup){
        SetPlayerPos(...);
        GivePlayerWeapon(...);
    }
    return 1;
}
hope it helps
k i am trying but what to write in
MyPickup = CreatePickup(.....)
I want add a minigun pick up at this location (1384.394, 2186.594, 11.023)


Respuesta: Pickup teleport - TheChaoz - 07.03.2011

search for the function on the wiki to see it's parameters and complete them, acording the pickup that u want to create.