Need Some Help Please -
Buzzbomb - 15.11.2010
Im wanting my gamemode to auto save and load player pos and i like to have the X Y Z save to the user account file so when they reconnect they spawn where the last was, Any Ideals How My player info for xyz is pLocX pLocY pLocZ
Re: Need Some Help Please -
Scenario - 15.11.2010
When they disconnect, get their position using "GetPlayerPos()", save it into your defined player variables. When they spawn, set them to the position as defined in their user account profile.
Re: Need Some Help Please -
Buzzbomb - 15.11.2010
GetPlayerPos(playerid, "LocX",PlayerInfo[pLocX]); Like this ? i hope hehe ill try
Re: Need Some Help Please -
Blt950 - 15.11.2010
Wrong. To get the players position you've to do something like this:
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
And then save it. (If this is the way you save it)
pawn Код:
PlayerInfo[pLocX] = x;
PlayerInfo[pLocY] = y;
PlayerInfo[pLocZ] = z;
Re: Need Some Help Please -
Buzzbomb - 15.11.2010
Man i seriously gotta learn those errors ****** time hehe
pawn Код:
SER0~1.3\GAMEMO~1\ARS.pwn(463) : error 033: array must be indexed (variable "PlayerInfo")
SER0~1.3\GAMEMO~1\ARS.pwn(464) : error 033: array must be indexed (variable "PlayerInfo")
SER0~1.3\GAMEMO~1\ARS.pwn(465) : error 033: array must be indexed (variable "PlayerInfo")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
Re: Need Some Help Please -
Blt950 - 15.11.2010
Looks like we both forgot to target who is going to get those values
Like
pawn Код:
PlayerInfo[playerid][pLocX] = x;
PlayerInfo[playerid][pLocY] = y;
PlayerInfo[playerid][pLocZ] = z;
Re: Need Some Help Please -
Buzzbomb - 15.11.2010
Quote:
Originally Posted by Blt950
Looks like we both forgot to target who is going to get those values
Like
pawn Код:
PlayerInfo[playerid][pLocX] = x; PlayerInfo[playerid][pLocY] = y; PlayerInfo[playerid][pLocZ] = z;
|
pawn Код:
SER0~1.3\GAMEMO~1\ARS.pwn(463) : warning 213: tag mismatch
SER0~1.3\GAMEMO~1\ARS.pwn(464) : warning 213: tag mismatch
SER0~1.3\GAMEMO~1\ARS.pwn(465) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Warnings.
This might be more of assistance im sure i hope
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), ARS_SERVERFILES, name);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
printf("The player left when he was at %f,%f,%f.", X,Y,Z);
PlayerInfo[playerid][pLocX] = X;
PlayerInfo[playerid][pLocY] = Y;
PlayerInfo[playerid][pLocZ] = Z;
Re: Need Some Help Please -
Buzzbomb - 15.11.2010
Could Someone Please Help me this is retarded..
Re: Need Some Help Please -
Buzzbomb - 16.11.2010
Hello its 11pm Someone please respond I need to Know how to save player Pos