Jump to content
  • 0

pomoc SetPVarFloat a GetPVarFloat


Miny24

Dotaz

Zdravíčko, mám jeden dotaz ... Udělal jsem si registraci ve které používám SetPVarInt a GetPVarInt to vše mi jde jak má ... Ale tedka si chci udělat uložení pozice přes SetPVarFloat a GetPVarFloat a totálně to zatím nechápu ... Na Wiki jsem to sice našel ale prostě mi to nejde .. Po odpojení ze sevreru mám udělané ukládání takto

 

public OnPlayerDisconnect(playerid, reason)
{
   format(file, 128, "testing/%s.txt", GetName(playerid));

   if(GetPVarInt(playerid, "Logged") == 1)
   {
       new Float:x,Float:y,Float:z;
       GetPlayerPos(playerid,x,y,z);
       dini_FloatSet(file, "PositionX", SetPVarFloat(playerid,"xpos",x));
       dini_FloatSet(file, "PositionY", SetPVarFloat(playerid,"ypos",y));
       dini_FloatSet(file, "PositionZ", SetPVarFloat(playerid,"zpos",z));
   }
   return 1;
}

 

všechno se uloží, ale PositionX,PositionY,PositionZ = 0.000000 .... Takže nevím jak to udělat pracuji s tímto po 1 .. Kdo ví jak na to tak prosím o pomoc ... Díky hezké odpoledne ...:)

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Majitel

dini_FloatSet(file, "PositionX", SetPVarFloat(playerid,"xpos",x));

dini_FloatSet(file, "PositionY", SetPVarFloat(playerid,"ypos",y));

dini_FloatSet(file, "PositionZ", SetPVarFloat(playerid,"zpos",z));

[/code]

 

Proč tam máš Set a ne Get? Snad potřebuješ tu hodnotu zjistit a né ji nastavit :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...