SA-MP Forums Archive
Update 3d text label - 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: Update 3d text label (/showthread.php?tid=473809)



Update 3d text label - Pawnie - 04.11.2013

helo. my problem is I cannot update label. how do i update and still keep old "Crated by"

Код:
CMD:3d(playerid,params[])
{
	new Float:x,Float:z,Float:y;
	new string[128];
	format(string,sizeof(string), "Created by %s\nUpdated: No", GetName(playerid));
	GetPlayerPos(playerid,x,y,z);
	Create3DTextLabel(string,col_lb,x,y,z,20.0,0,0);
	return 1;
}

CMD:update(playerid,params[])
{

	//Update3DTextLabel?
}



Re: Update 3d text label - HardRock - 04.11.2013

PHP код:
new Text3DMyText;
CMD:3d(playerid,params[])
{
    new 
string[128], Float:xFloat:zFloat:y;
    
format(string,sizeof(string), "Created by %s\nUpdated: No"GetName(playerid));
    
GetPlayerPos(playerid,x,y,z);
    
MyText Create3DTextLabel(string,col_lb,x,y,z,20.0,0,0);
    return 
1;
}
CMD:update(playerid,params[])
{
    new 
string[128];
    
format(string,sizeof(string), "Created by %s\nUpdated: No"GetName(playerid));
    
Update3DTextLabelText(MyTextcol_lbstring);
    return 
1;




Re: Update 3d text label - Pawnie - 04.11.2013

no no, it will update the "Created by". I want of the "Created by" to keep the real owner and update the "Updated" to Yes


Re: Update 3d text label - HardRock - 04.11.2013

PHP код:
new Text3DMyText3dName[MAX_PLAYER_NAME]; 
CMD:3d(playerid,params[]) 

    new 
string[128], Float:xFloat:zFloat:y
    
format(stringsizeof(string), "Created by %s\nUpdated: No"GetName(playerid)); 
    
format(3dNamesizeof(3dName), "%s"GetName(playerid)); 
    
GetPlayerPos(playerid,x,y,z); 
    
MyText Create3DTextLabel(string,col_lb,x,y,z,20.0,0,0); 
    return 
1

CMD:update(playerid,params[]) 

    new 
string[128]; 
    
format(string,sizeof(string), "Created by %s\nUpdated: Yes"3dName); 
    
Update3DTextLabelText(MyTextcol_lbstring); 
    return 
1




Re: Update 3d text label - Pawnie - 04.11.2013

invalid symbol name ""


Re: Update 3d text label - HardRock - 04.11.2013

What line?


Re: Update 3d text label - CharlieBrown - 04.11.2013

Quote:
Originally Posted by Pawnie
Посмотреть сообщение
invalid symbol name ""
pawn Код:
new Text3D: MyText;  

CMD:3d(playerid,params[])  
{  
    new string[128], Float:x, Float:z, Float:y;  
    format(string, sizeof(string), "Created by %s\nUpdated: No", GetName(playerid));  
    format(3dName, sizeof(3dName), "%s", GetName(playerid));  
    GetPlayerPos(playerid,x,y,z);  
    MyText = Create3DTextLabel(string,col_lb,x,y,z,20.0,0,0);  
    return 1;  
}  

CMD:update(playerid,params[])  
{  
    new string[128] 3dName[MAX_PLAYERS];
    GetPlayerName(playerid, 3dName, sizeof(3dName));  
    format(string,sizeof(string), "Created by %s\nUpdated: Yes", 3dName);  
    Update3DTextLabelText(MyText, col_lb, string);  
    return 1;  
}



Re: Update 3d text label - HardRock - 04.11.2013

What is different here:

PHP код:
new Text3DMyText
CMD:3d(playerid,params[]) 

    new 
string[128], Float:xFloat:zFloat:y
    
format(string,sizeof(string), "Created by %s\nUpdated: No"GetName(playerid)); 
    
GetPlayerPos(playerid,x,y,z); 
    
MyText Create3DTextLabel(string,col_lb,x,y,z,20.0,0,0); 
    return 
1

CMD:update(playerid,params[]) 

    new 
string[128]; 
    
format(string,sizeof(string), "Created by %s\nUpdated: No"GetName(playerid)); 
    
Update3DTextLabelText(MyTextcol_lbstring); 
    return 
1

and here?

PHP код:
new Text3DMyText;  
CMD:3d(playerid,params[])  
{  
    new 
string[128], Float:xFloat:zFloat:y;  
    
format(stringsizeof(string), "Created by %s\nUpdated: No"GetName(playerid));  
    
format(3dNamesizeof(3dName), "%s"GetName(playerid));  
    
GetPlayerPos(playerid,x,y,z);  
    
MyText Create3DTextLabel(string,col_lb,x,y,z,20.0,0,0);  
    return 
1;  
}  
CMD:update(playerid,params[])  
{  
    new 
string[1283dName[MAX_PLAYERS];
    
GetPlayerName(playerid3dNamesizeof(3dName));  
    
format(string,sizeof(string), "Created by %s\nUpdated: Yes"3dName);  
    
Update3DTextLabelText(MyTextcol_lbstring);  
    return 
1;