26.02.2014, 17:33
I recommend reading more and putting effort on investigation before attempting to make such things.
This is how it is actually done:
playerid = a variable which is also an integer, in most of the native callbacks it represents the ID of the player that called said callback.
This is how it is actually done:
pawn Код:
//somewhere outside any function
new Text3D:Label[MAX_PLAYERS]; //create a global array with 500 cells so you can use one per player
new str[5];
format(str, sizeof str, "%d", playerid); //format the string
Label[playerid] = Create3DTextLabel(str, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0); //create the label, save it's ID in the array for each player
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.7); //just attach the label