SA-MP Forums Archive
dynamic3dtextlable error - 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)
+--- Thread: dynamic3dtextlable error (/showthread.php?tid=647071)



dynamic3dtextlable error - TitoRayne - 29.12.2017

REMOVED


Re: dynamic3dtextlable error - Gameluner - 29.12.2017

Код:
new Float:health,Float:armour, playerid,string;



Re: dynamic3dtextlable error - TitoRayne - 29.12.2017

Quote:
Originally Posted by Gameluner
Посмотреть сообщение
Код:
new Float:health,Float:armour, playerid,string;
Where to put that one? can you help me please?


Re: dynamic3dtextlable error - TitoRayne - 29.12.2017

this is my first help request.

https://sampforum.blast.hk/showthread.php?tid=647014


Re: dynamic3dtextlable error - TitoRayne - 29.12.2017

Код:
C:\New folder\gamemodes\erp.pwn(9804) : error 035: argument type mismatch (argument 1)
C:\New folder\gamemodes\erp.pwn(9804) : error 035: argument type mismatch (argument 1)
C:\New folder\gamemodes\erp.pwn(9805) : error 035: argument type mismatch (argument 3)
C:\New folder\gamemodes\erp.pwn(9801) : warning 203: symbol is never used: "string"
C:\New folder\gamemodes\erp.pwn(9801 -- 9808) : error 010: invalid function or declaration
i tried what you comment but still fail


Re: dynamic3dtextlable error - Gameluner - 29.12.2017

Код:
forward NameTag();
public NameTag()
{
    new Float:health,Float:armour, playerid,string[40];
	GetPlayerHealth(playerid,health);
	GetPlayerArmour(playerid,armour);
	format(string,sizeof(string),"%d hp and %d armour",health,armour);
	UpdateDynamic3DTextLabelText(PlayerInfo[playerid][pSpecialTag], -1, string);
    return 1;
}
I didn't test it
If doesn't work, you can try this
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
         new string[40],Float:hp,Float:ar;
         GetPlayerArmour(playerid,ar);
         GetPlayerHealth(playerid,hp);
         format(string, sizeof(string), "%d hp and %d armour",hp,ar);
         UpdateDynamic3DTextLabelText(PlayerInfo[playerid][pSpecialTag], -1, string) 
         return 1;
}



Re: dynamic3dtextlable error - TitoRayne - 29.12.2017

Quote:
Originally Posted by Gameluner
Посмотреть сообщение
Код:
forward NameTag(playerid);
public NameTag(playerid)
{
    new Float:health,Float:armour, playerid,string[40];
	GetPlayerHealth(playerid,health);
	GetPlayerArmour(playerid,armour);
	format(string,sizeof(string),"%d and %d armour",health,armour);
	UpdateDynamic3DTextLabelText(PlayerInfo[playerid][pSpecialTag], -1, string);
    return 1;
}
I didn't test it
I'll load it in my script but im not sure if it will work. just stay tuned on this thread plux..


Re: dynamic3dtextlable error - TitoRayne - 29.12.2017

REMOVED


Re: dynamic3dtextlable error - TitoRayne - 29.12.2017

Quote:
Originally Posted by Gameluner
Посмотреть сообщение
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
         new string[128],hp,ar;
         GetPlayerArmour(playerid,ar);
         GetPlayerHealth(playerid,hp);
         format(string, sizeof(string), "%d hp and %d armour",hp,ar);
         UpdateDynamic3DTextLabelText(PlayerInfo[playerid][pSpecialTag], -1, string) 
         return 1;
}
Im using this one is it bad? or ill use that one you've give to me?
Код:
new string[128];
  		format(string, sizeof(string), "{089DCE}HP: %.0f - {00FF00}AR: %.0f", GetPlayerHealth(playerid), GetPlayerArmour(playerid));
		UpdateDynamic3DTextLabelText(PlayerInfo[playerid][pSpecialTag], COLOR_WHITE, string);



Re: dynamic3dtextlable error - Gameluner - 29.12.2017

Код:
forward NameTag(playerid);
public NameTag(playerid)
{
    new Float:health,Float:armour, string[40];
    GetPlayerHealth(playerid,health);
    GetPlayerArmour(playerid,armour);
    format(string,sizeof(string),"%d hp and %d armour",health,armour);
    UpdateDynamic3DTextLabelText(PlayerInfo[playerid][pSpecialTag], -1, string);
    return 1;
}
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    new string[40],Float:hp,Float:ar;
    GetPlayerArmour(playerid,ar);
    GetPlayerHealth(playerid,hp);
    format(string, sizeof(string), "%d hp and %d armour",hp,ar);
    UpdateDynamic3DTextLabelText(PlayerInfo[playerid][pSpecialTag], -1, string) 
    return 1;
}
Try now.. If is there error or warning, number the lines, ty