Position Command Issue.
#1

So, Its my first command using the storing memory of whatever they call it string i made a command with this shit and it doesnt work propelly:
PHP код:
CMD:pos(playeridparams[])
{
    new 
string1[128];
    new 
Float:X,Float:Y,Float,Z;
    
GetPlayerPos(playerid,X,Y,Z);
    
format(string1,sizeof(string1),"Your Postion is: X: %.*t,Y: %.*t,Z: %.*t",X,Y,Z);
    
SendClientMessage(playerid,COLOR_GREEN,string1);
    return 
1;

When i type /pos i get this Your Postion is; X:t, Y:t, Z:t
Any Help ?
Reply
#2

PHP код:
CMD:pos(playeridparams[]) 

    new 
string1[128]; 
    new 
Float:X,Float:Y,Float,Z
    
GetPlayerPos(playerid,X,Y,Z); 
    
format(string1,sizeof(string1),"Your Postion is: X: %f,Y: %f,Z: %f",X,Y,Z); 
    
SendClientMessage(playerid,COLOR_GREEN,string1); 
    return 
1

Try this, there is no such thing called %.*t according to wiki. Check more about it here;

https://sampwiki.blast.hk/wiki/Format
Reply
#3

Thank You.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)