Posts: 9
Threads: 1
Joined: Nov 2017
Reputation:
0
i created pickup . now i want to get nrg OnPlayerPickUpPickup help pls.
Posts: 218
Threads: 50
Joined: Dec 2017
Reputation:
0
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..
Posts: 9
Threads: 1
Joined: Nov 2017
Reputation:
0
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
Posts: 1,071
Threads: 24
Joined: Aug 2014
Reputation:
0
Show the code you have. Just this pickup.
Posts: 9
Threads: 1
Joined: Nov 2017
Reputation:
0
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
Posts: 233
Threads: 31
Joined: Feb 2018
Reputation:
0
Did u try replacing id 522 with vehicleid in set vehicle virtual world?
Posts: 9
Threads: 1
Joined: Nov 2017
Reputation:
0
now its working ! thank you so much Mike.
+1 rep