SA-MP Forums Archive
Create Pickups for a player only? - 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: Create Pickups for a player only? (/showthread.php?tid=149045)



Create Pickups for a player only? - Jochemd - 20.05.2010

Hello,

Is it possible to create pickups for one player only?

Regards, Jochem

BTW: I don't want to use checkpoints


Re: Create Pickups for a player only? - sushihusi - 20.05.2010

No, it's not possible. But you can create pickups to virtual worlds. So you set the player's virtual world to the virtual world of the pickup. And if you do this only that player will see the pickup.

Код:
CreatePickup(model,type,X,Y,Z,1);//We set the pickup to virtual world 1
SetPlayerVirtualWorld(playerid,1););//We set the player's virtual world to 1 and only that player will see the pickup
I hope it helps!


Re: Create Pickups for a player only? - Jochemd - 20.05.2010

Yes, but I am going to use it for boarding an plane for flying to another city. If you escape there you're stuck in the virtual world. I want it so the player only sees the pickup

Maybe I found a better way with using checkpoint

Then I got another question. IS there a way to use OnPlayerEnterCheckpoint for more then 1 checkpoint? Because there is no 'checkpointid' in it...


Re: Create Pickups for a player only? - ViruZZzZ_ChiLLL - 20.05.2010

No, it's not possible to create a pickup for a certain player only.

Quote:
Originally Posted by Jochemd
Then I got another question. IS there a way to use OnPlayerEnterCheckpoint for more then 1 checkpoint? Because there is no 'checkpointid' in it...
Yeah, I've been kinda confused with the checkpoints thing too
So, I want to see an answer from someone with the checkpoints too


Re: Create Pickups for a player only? - NewTorran - 20.05.2010

Streamers like Incognito's or whatever his name is has a OnPlayerEnterDynamicCP(playerid, checkpointid)

I use that for more than one checkpoint


Re: Create Pickups for a player only? - sushihusi - 20.05.2010

No, you have todefine them. I give you an example. Maybe it helps you.

take this over OnGamemodeinit
Код:
new checkpoint[MAX_PLAYERS]
if you set a cP for the player use this
Код:
SetPlayerCheckpoint(...)
checkpoint[playerid]=1;
...
checkpoint[playerid]=2;
...
this to onplayerentercheckpoint
Код:
if(checkpoint[playerid]==1){
...
}



Re: Create Pickups for a player only? - shady91 - 20.05.2010

Use this streamer http://forum.sa-mp.com/index.php?topic=127905.0 it has pickups objects checkpoints etc.. and they can all be created just for 1 player to see it.


Re: Create Pickups for a player only? - NewTorran - 20.05.2010

Quote:
Originally Posted by Shady91
and they can all be created just for 1 player to see it.
Really? It does that? I just thought they were for everyone when you created a pickup using that


Re: Create Pickups for a player only? - Scenario - 20.05.2010

Quote:
Originally Posted by ViruZZzZ_ChiLLL
No, it's not possible to create a pickup for a certain player only.

Quote:
Originally Posted by Jochemd
Then I got another question. IS there a way to use OnPlayerEnterCheckpoint for more then 1 checkpoint? Because there is no 'checkpointid' in it...
Yeah, I've been kinda confused with the checkpoints thing too
So, I want to see an answer from someone with the checkpoints too
No, you can only have 1 checkpoint when using the OnPlayerEnterCheckpoint function. You need to use a streamer, search [REL] Streamer Plugin that will get you to the best one on the forum, in my opinion.


Re: Create Pickups for a player only? - Jochemd - 20.05.2010

@Bart_Simpson: Can you explain some more? I don't want to use a streamer. It's for some reasons I can't really explain