ORM System
#2

hi,

Lets Say You Got Enum
Enum pInfo
{
Float:X,
Float:Y,
Float:Z,
Float:FacingAngle
};
new PlayerInfo[MAX_PLAYERS][pInfo];

This Is Your Player Information Enum , Basically Like A File System For saving peoples data.

stock SavePlayerInfo(playerid)
{
new Float:Pos[4];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); ///This Grabs The Player X Y Z Axis
GetPlayerFacingAngle(playerid, Pos[3]); ///This Grabs The Player Facing Angle
PlayerInfo[playerid][X] = Pos[0]; /// This stores Float:X Of The Player Pos and stores it to enum Same As Below
PlayerInfo[playerid][Y] = Pos[1];
PlayerInfo[playerid][Z] = Pos[2];
PlayerInfo[playerid][FacingAngle] = Pos[3];
return 1;
}
public OnPlayerDisconnect(playerid)
{
SavePlayerInfo(playerid); /// This Will Call The SavePlayerInfo(playerid) stock CallBack
return 1;
}
That's How The Save Works But Im a Bit Tired To Even Write A Full Page Of This Request Please Use ****** Search For Y_INI OR DINI on How to Parse Files This Will Tell You How To Make The Load stock/public
But basically public onPlayerConnect(playerid) It Will Parse The File Load The Data from your scriptfiles folder in your server and read your name find the file name see if its correct check your data then Example OnPlayerSpawn(playerid)
is basically SetPlayersFacingAngle(playerid, PlayerInfo[playerid][FacingAngle]); would set your facing angle from your file in script files sorry cant be much help right now .. but at least I pointed you in the right direction


Just Read It Again You want it for Orm or Something sounds complicated I use YINI best faster too And MySQL Overrated in my opion and can be exploited
Reply


Messages In This Thread
ORM System REP+ - by Wizzy951 - 05.08.2014, 00:03
Re: ORM System - by Pillhead2007 - 05.08.2014, 00:45
Re: ORM System - by Wizzy951 - 05.08.2014, 01:09
Re: ORM System - by Pillhead2007 - 05.08.2014, 01:19
Re: ORM System - by Wizzy951 - 05.08.2014, 11:18
Re: ORM System - by Wizzy951 - 06.08.2014, 16:48
Re: ORM System - by Wizzy951 - 12.08.2014, 23:47
Re: ORM System - by Dignity - 12.08.2014, 23:58

Forum Jump:


Users browsing this thread: 2 Guest(s)