pickup help
#1

i created pickup . now i want to get nrg OnPlayerPickUpPickup help pls.
Reply
#2

CreateVehicle(model, x, y, z, rot, 0, 0, 200); //Model id and u can getplayerpos or spawn an nrg at the pickup's pos...
PutPlayerInVehicle(playerid, model, 0); // here we put the player inside the vehicle..
Reply
#3

Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
    if(pickupid == urpickup)
    {
       CreateVehicle(522, x, y, z, a, -1, -1, 60);
    }
    return 1;
}
Something like that, but if u want you can try using PutPlayerInVehicle and stuff like that
Reply
#4

yeah its working but its spawning in virtual world 0 i use this SetVehicleVirtualWorld but still nrg going in vw 0
i want in vw 4
Reply
#5

Show the code you have. Just this pickup.
Reply
#6

new pickupnrg;

public OnGameModeInit()
{
pickupnrg = CreatePickup(1318, 2, 790.2700,-2129.1924,60.8927, 4);
}

if(pickupid == pickupnrg)
{
new vehicleid = GetPlayerVehicleID(playerid);
CreateVehicle(522, 790.2700,-2129.1924,60.8927,34.8686, -1, -1, 60);
SetVehicleVirtualWorld(522, 4);
PutPlayerInVehicle(playerid, vehicleid, 0);
}

is this correct ?
i can see arrow pickup in virtual world 4 but its not spawning nrg when pickup
Reply
#7

Did u try replacing id 522 with vehicleid in set vehicle virtual world?
Reply
#8

Quote:
Originally Posted by Mike861
Посмотреть сообщение
Did u try replacing id 522 with vehicleid in set vehicle virtual world?
yes i did same thing happening
Reply
#9

Код:
new nrg;
nrg = CreateVehicle(522, 790.2700,-2129.1924,60.8927,34.8686, -1, -1, 60);
SetVehicleVirtualWorld( nrg, 4 );
Try doing it this way
Reply
#10

now its working ! thank you so much Mike.
+1 rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)