22.07.2009, 21:00
If I want to use a position saving system should i delete SetPlayerSpawn?Thanks
public OnPlayerDisconnect(playerid, reason)
{
new str[256], plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(str, sizeof(str), "%s.ini", plname);
new Float:X, Y, Z;
GetPlayerPos(playerid, X, Y, Z);
dini_FloatSet(str, "X", X);
dini_FloatSet(str, "Y", Y);
dini_FloatSet(str, "Z", Z);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
new str[256], plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(str, sizeof(str), "%s.ini", plname);
SetPlayerPos(playerid, dini_Float(str, "X"), dini_Float(str, "Y"), dini_Float(str, "Z"));
return 1;
}
Originally Posted by James_Alex(Coder)
ah you want a saving position function ?
try this use dini include pawn Код:
|
Originally Posted by SilentHuntR
If you have the dini include it should work marvelously.
But I'm just gonna go ahead and assume you don't. |