Playerid = float or?.
#1

I want to make a dynamiccp shows only to one player.

But I want and need to get his id for this.

Is playerid = float like x y z positions? Or?.

If so can I use setpvar smthing and then getpvar smthing for floats to playerid?.
Reply
#2

Its not a Float.
Reply
#3

playerid is an integer. If you want to use PVars to retain floats, use SetPVarFloat(playerid, "<varname>", <floatvar>);
Reply
#4

Hmm..

Is there any kind of..

For example..
pawn Код:
GetPlayerID(playerid);
GetPVarFloat(playerid,"a",playerid);
So then for example I can
pawn Код:
SetPlayerHealth(GetPVarFloat("a"), 100);

Or?.

Well, you can say I want to retain playerid with PVar.

Or is there any other way to retain a playerid?.

Because in Incognito streamer if I'm using "-1" in one of the "CreateDynamicCP" argument the checkpoint will shows to all players, so I'm trying to make it visible to 1 player only.
Reply
#5

The better question is where do you want to get playerid ? In which callback ?
Reply
#6

In this:

CreateDynamicCP.

I think it has playerid in it, right?.
Reply
#7

So you use Incognito's plugin

lets check his streamer.inc (pawno\include\)
Quote:
Originally Posted by streamer.inc
native CreateDynamicCP(Float: x, Float:y, Float:z, Float: size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
Yes it has a playerid parameter

But if you want to use it you need to go under a callback (public) that provides the playerid
Like OnPlayerSpawn, OnPlayerConnect, OnPlayerRequestClass, ...
Reply
#8

You can use playerid, or any integer (from 0 to MAX_PLAYERS) like: SetPlayerHealth(50,100.0); - heal only id 50.
Reply
#9

Quote:
Originally Posted by [BKR]LUCAGRABACR
Посмотреть сообщение
Hmm..
GetPlayerID(playerid);
Why would you want to get the ID of a player if you already have it? GetPLAYERID(PLAYERID) - doesn't make sense at all.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)