Wrong coords
#1

Hey guys i have a cmd that will add a faction spawn where i am but it give's wrong coords like the Z is +0.5 instead of beeing right where i am.

PIC: http://imgur.com/a/dgu71

HTML Code:
CMD:addfac(playerid, params[])
{
	new fac[40], var100[60];
	if(!IsManager(playerid)) return SCM(playerid, COLOR_ERROR, "Nu ai gradul necesar ca sa folosesti aceasta comanda!");
    if(sscanf(params,"s[40]", fac)) return SCM(playerid, COLOR_SYN, "Sintaxa:{FFFFFF} /addfac [Nume Factiune]");
	{
	    new Float:POSX, Float:POSY, Float:POSZ;
		GetPlayerPos(playerid, POSX, POSY, POSZ);
		
       	gQuery[0] = (EOS);
     	mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO `factions` (`Name`,`ExitX`,`ExitY`,`ExitZ`,`Slots`,`MinLevel`,`Application`,`News`) VALUES ('%s','%f','%f','%f','10','5','0','Bun venit in %s')", fac, POSX, POSY, POSZ, fac);
     	mysql_query(handle, gQuery);
     	
     	format(var100, sizeof(var100), "Ai adaugat factiunea [%s].", fac);
     	SCM(playerid, COLOR_WHITE, var100);
     	
     	defer EditFaction(playerid);
 	}
	return 1;
}
When i load the factions they read the coords from structure where factions are so i didn't add +0.5 or else to the load.
Reply


Messages In This Thread
Wrong coords - by StR_MaRy - 18.06.2017, 14:41
Re: Wrong coords - by Sew_Sumi - 18.06.2017, 15:55
Re: Wrong coords - by StR_MaRy - 18.06.2017, 16:52
Re: Wrong coords - by Eoussama - 18.06.2017, 17:13
Re: Wrong coords - by skuller12 - 18.06.2017, 17:15
Re: Wrong coords - by CrossUSAAF - 18.06.2017, 17:33
Re: Wrong coords - by StR_MaRy - 18.06.2017, 17:38

Forum Jump:


Users browsing this thread: 1 Guest(s)