28.03.2013, 21:43
(
Последний раз редактировалось horsemeat; 29.03.2013 в 00:34.
)
I tried making a 3dtext label for a player but I am having a problem it is not appearing in the game here is the command
any body know what I am doing wrong
Pawnie Was Right I did not use the right syntax but he gave me the Syntax for Create3DTextLabel & not CreatePlayer3DTextLabel
I forgot to add this to my Code
[CODE]//INVALID_PLAYER_ID,INVALID_VEHICLE_ID[/CODE]
So the Proper code is this
Thanks for Helping me and if My solution helped you understand then press that rep button and also for pawnie for helping relize the Syntax was wrong
Код:
//somewhere on the top new PlayerText3D:label; new teststate; //command CMD:test(playerid,params[]) { if(IsPlayerAdmin(playerid)) { if( teststate== 0) { teststate=1; new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); label = CreatePlayer3DTextLabel(playerid,"Test",PURPLE,x,y,z,40.0,0,0); SendClientMessage(playerid,YELLOW,"LabelCreated"); } else if(teststate == 1) { teststate=0; DeletePlayer3DTextLabel(playerid,label); SendClientMessage(playerid,YELLOW,"Labeldeleted"); } } else { SendClientMessage(playerid, RED, "ERROR"); } return 1; }
Solved
Pawnie Was Right I did not use the right syntax but he gave me the Syntax for Create3DTextLabel & not CreatePlayer3DTextLabel
I forgot to add this to my Code
[CODE]//INVALID_PLAYER_ID,INVALID_VEHICLE_ID[/CODE]
So the Proper code is this
Код:
label = CreatePlayer3DTextLabel(playerid,"Test",PURPLE,x,y,z,40.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0); //or if you want the attach it to a player CreatePlayer3DTextLabel(playerid,"Test",PURPLE,x,y,z,40.0,playerid,INVALID_VEHICLE_ID,0) //or a car CreatePlayer3DTextLabel(playerid,"Test",PURPLE,x,y,z,40.0,INVALID_PLAYER_ID,vehicleid,0)