Help with setplayerpos problem please
#1

Код:
CMD:entrar(playerid)
{
new
	Str[256],
	type,
	Float:bX,
	Float:bY,
	Float:bZ,
	Owner[128],
	Desc[128],
	Payout,
	Price,
	iX,
	iY,
	iZ,
	iA,
	interior,
	vw,
	fee,
	bank,
	bought;

mysql_query("SELECT * FROM `business`");
mysql_store_result();
if(mysql_num_rows() > 0)
{
        while(mysql_fetch_row(Str))
        {
	        sscanf(Str, "p<|>dfffs[128]s[128]ddffffddddd", type,bX, bY, bZ, Owner, Desc, Payout, Price, iX,iY,iZ,iA,interior,vw,fee,bank,bought);
	        if(IsPlayerInRangeOfPoint(playerid,1, bX,bY,bZ)==1){
         	new string[128];
         	format(string, sizeof(string), "type: %d dono: %s iX: %f iY: %f iZ:%f", type, Owner, iX,iY,iZ);
         	SendClientMessage(playerid, COLOR_GREY, string);
			SendClientMessage(playerid, COLOR_GREY, "[INFO]: Vocк entrou em uma empresa.");
			SetPlayerPos(playerid, iX,iY,iZ);
			SetPlayerFacingAngle(playerid, iA);
			printf("%s: /entrar para X:%f Y:%f Z:%f", pName(playerid),iX,iY,iZ  );
			return 1;
			}
		}
}
mysql_free_result();
return 1;
}
The printf returned me:
Quote:

[11:42:52] Lucca_Xavier: /entrar para X:246.783996 Y:63.900199 Z:1003.640014

But my player gets tped to a place out of the world boundries, what do is happening?
Reply
#2

Can someone help me? Please? I have no idea of what's wrong
Reply
#3

Maybe because the variables ix, iy, and yz, does not have float tags.
Reply
#4

Well, thanks a lot, sometimes we are so into the script that we forget simple tags.

It worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)