Author Topic: Save Pos  (Read 6850 times)

0 Members and 2 Guests are viewing this topic.

Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Save Pos
« on: January 22, 2013, 05:18:36 am »
[pawn]public OnPlayerDisconnect(playerid, reason)
{
if(GetPos(playerid)) return 0;
SetNew(playerid,1);
   return 1;
}[/pawn]
[pawn]public OnPlayerSpawn(playerid,classid,teamid)
{
    new gpX = dini_Int( file, "PosX" ), gpY = dini_Int( file, "PosY" ), gpZ = dini_Int( file, "PosZ" );
if(GetNew(playerid) == 1) {
SetPlayerPos(playerid,gpX,gpY,gpZ,0,0);
}
if(GetNew(playerid) == 0) {
}
   return 1;
}[/pawn]

Code: [Select]
public GetNew(playerid)
{
format(MSN,256, REGISTERS, gPlayers[playerid]);
new n; n = dini_Int(MSN,"New");
return n;
}
public SetNew(playerid,Monto)
{
format(MSN,256, REGISTERS, gPlayers[playerid]);
dini_IntSet(MSN,"New",Monto);
}
public GetPos(playerid)
{
format(MSN,256, REGISTERS, gPlayers[playerid]);
new Float:gpX,Float:gpY,Float:gpZ,str[256],string[256],sz[256];
GetPlayerPos(playerid,gpX,gpY,gpZ);
format(string,sizeof(string),"%.0f",gpX);
format(str,sizeof(str),"%.0f",gpY);
format(sz,sizeof(sz),"%.0f",gpZ);
dini_Set(MSN, "PosX", string);
dini_Set(MSN, "PosY", str);
dini_Set(MSN, "PosZ", sz);
return 0;
}

Because the player does not appear where it's supposed to appear
is like a bug
« Last Edit: January 23, 2013, 04:37:48 pm by omarlin97 »
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Re: Save Pos
« Reply #1 on: January 22, 2013, 05:57:36 pm »
????????????
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: Save Pos
« Reply #2 on: January 22, 2013, 05:59:39 pm »
BE PATIENCE ! Don't double post !

Passed just 40 minutes.  ::)

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Re: Save Pos
« Reply #3 on: January 22, 2013, 06:24:05 pm »
BE PATIENCE ! Don't double post !

Passed just 40 minutes.  ::)

Oks Sorry sseebbyy
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: Save Pos
« Reply #4 on: January 23, 2013, 04:15:34 pm »
Do you save the position when the player die ? (to can be took data from ini files)

'cause you know... maybe that player left the server when he was on RequestClass. (Im not sure if your pos can be saved when you are at RequestClass location)

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Re: Save Pos
« Reply #5 on: January 23, 2013, 04:30:17 pm »
I mean that the system as it is bugged that sends me to another place
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: Save Pos
« Reply #6 on: January 24, 2013, 11:10:31 pm »
I mean that the system as it is bugged that sends me to another place

WN con letras grandes.... copias todo lo que usa dilson por eso no te ayuda....

Es facil ver tu problema xD
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Save Pos
« Reply #7 on: January 24, 2013, 11:23:09 pm »
I mean that the system as it is bugged that sends me to another place

WN con letras grandes.... copias todo lo que usa dilson por eso no te ayuda....

Es facil ver tu problema xD

FUCK
CAN
U
SPEAK
ENGLISH???


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Re: Save Pos
« Reply #8 on: January 25, 2013, 04:00:31 am »
I mean that the system as it is bugged that sends me to another place

WN con letras grandes.... copias todo lo que usa dilson por eso no te ayuda....

Es facil ver tu problema xD

Pues Resuelvelo tu idiota :P
Se que lo amas por lo tanto que lo mencionas :D
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: Save Pos
« Reply #9 on: January 25, 2013, 06:26:11 pm »
[pawn]public OnPlayerDisconnect(playerid, reason)
{
   new file[256];
   format(file, sizeof(file), REGISTERS, gPlayers[playerid]);
    GetPlayerPos(playerid, CoordX[playerid], CoordY[playerid], CoordZ[playerid]);
   
 dini_FloatSet(file, "pY", CoordY[playerid]);
 dini_FloatSet(file, "pZ", CoordZ[playerid]);
 dini_FloatSet(file, "pX", CoordX[playerid]);
     }
   return 1;
}[/pawn]
[pawn]public OnPlayerSpawn(playerid,classid,teamid)
{
SetPlayerPos(playerid, dini_Float(file, "pY"), dini_Float(file, "pX"), dini_Float(file, "pZ"),0,0);
   return 1;
}[/pawn]

[pawn]
new Float:CoordX[MAX_PLAYERS]; // Definicion de la locacion a guardar
new Float:CoordY[MAX_PLAYERS];
new Float:CoordZ[MAX_PLAYERS];
[/pawn]


Prueba aver que tal te funciona //la primera vez que des spawn  apareceras dentro del campo de golf "porke no tiene definida una loc, pero al desconectart te la creara" intenta no desconectarte en el mar o en el aeropuerto porke te manda a otras locs
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Re: Save Pos
« Reply #10 on: January 25, 2013, 08:53:10 pm »
[pawn]public OnPlayerDisconnect(playerid, reason)
{
   new file[256];
   format(file, sizeof(file), REGISTERS, gPlayers[playerid]);
    GetPlayerPos(playerid, CoordX[playerid], CoordY[playerid], CoordZ[playerid]);
   
 dini_FloatSet(file, "pY", CoordY[playerid]);
 dini_FloatSet(file, "pZ", CoordZ[playerid]);
 dini_FloatSet(file, "pX", CoordX[playerid]);
     }
   return 1;
}[/pawn]
[pawn]public OnPlayerSpawn(playerid,classid,teamid)
{
SetPlayerPos(playerid, dini_Float(file, "pY"), dini_Float(file, "pX"), dini_Float(file, "pZ"),0,0);
   return 1;
}[/pawn]

[pawn]
new Float:CoordX[MAX_PLAYERS]; // Definicion de la locacion a guardar
new Float:CoordY[MAX_PLAYERS];
new Float:CoordZ[MAX_PLAYERS];
[/pawn]


Prueba aver que tal te funciona //la primera vez que des spawn  apareceras dentro del campo de golf "porke no tiene definida una loc, pero al desconectart te la creara" intenta no desconectarte en el mar o en el aeropuerto porke te manda a otras locs

Aun Esta Bugged
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: Save Pos
« Reply #11 on: January 26, 2013, 10:22:00 pm »
solo algunas veces pasa  adwmas hasta en la wea de lvr se bugueaba y te tiraba dl cielo aveces
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Re: Save Pos
« Reply #12 on: January 27, 2013, 03:51:56 am »
Rayos necesito a alguien que me ayude a solucionar eso
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Save Pos
« Reply #13 on: January 28, 2013, 10:58:22 pm »
If you noticed that any of your posts have been deleted, you were either flaming or off-topic. Do not flame others. It is a basic rule. Some people whose posts were removed have already been warned for it.

If you are going to attack people and assert your alleged self-importance by calling yourself the greatest scripter on this planet and everyone else gay, you have been warned. If you continue, your punishments will become harsher.


Now stay on topic and answer the question in the OP.
Do not PM me for support.