Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Wrong coords

$
0
0
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.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>