Pickup teleport
#1

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

pawn Код:
new MyPckup;

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

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

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)
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)