01.03.2013, 01:37
Please don't spend your time commenting telling me I am dumb. I know I am C++ dumb, and I don't need to be called that.
Unless you are actually willing to help me, don't bother leaving a comment.
For those who are not dicks:
I am having a bit of trouble, I used this dini code (yes I did #include <dini> at the top of the script) that saved your position, and when I did. It spawned you in blueberry.
I then added:
And you spawned at the Easter Bay Airport, which is what I intended. But positions, do not save. They are changed in the file, but not loaded.
Could someone make this script spawn you if you log in for the first time at
and load your position afterwards?
This is my player class:
This is my RequestPlayerClass blah crap
I've searched for a solution, and can not find one. Please help me.
Unless you are actually willing to help me, don't bother leaving a comment.
For those who are not dicks:
I am having a bit of trouble, I used this dini code (yes I did #include <dini> at the top of the script) that saved your position, and when I did. It spawned you in blueberry.
Код:
public OnPlayerDisconnect(playerid, reason) { IsPlayerPassenger[playerid] = 0; new file[128], pname[MAX_PLAYER_NAME]; new Float:x, Float:y, Float:z; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "\\SavePos\\%s.ini", pname); if(!dini_Exists(file)) dini_Create(file); GetPlayerPos(playerid, x, y, z); dini_FloatSet(file, "posX", x); dini_FloatSet(file, "posY", y); dini_FloatSet(file, "posZ", z); return 1; } public OnPlayerSpawn(playerid) { new file[128], pname[MAX_PLAYER_NAME]; new Float:x, Float:y, Float:z; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "\\SavePos\\%s.ini", pname); x = dini_Float(file, "posX"); y = dini_Float(file, "posY"); z = dini_Float(file, "posZ"); SetPlayerPos(playerid, x, y, z); SetPlayerColor(playerid, 0xFFFFFFFF ); return 1; }
Код:
SetPlayerPos(playerid, -1421.3221,-287.5208,14.1484);
Could someone make this script spawn you if you log in for the first time at
Код:
-1421.3221,-287.5208,14.1484
Код:
public OnPlayerDisconnect(playerid, reason) { IsPlayerPassenger[playerid] = 0; new file[128], pname[MAX_PLAYER_NAME]; new Float:x, Float:y, Float:z; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "\\SavePos\\%s.ini", pname); if(!dini_Exists(file)) dini_Create(file); GetPlayerPos(playerid, x, y, z); dini_FloatSet(file, "posX", x); dini_FloatSet(file, "posY", y); dini_FloatSet(file, "posZ", z); return 1; } public OnPlayerSpawn(playerid) { new file[128], pname[MAX_PLAYER_NAME]; new Float:x, Float:y, Float:z; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "\\SavePos\\%s.ini", pname); x = dini_Float(file, "posX"); y = dini_Float(file, "posY"); z = dini_Float(file, "posZ"); SetPlayerPos(playerid, x, y, z); SetPlayerColor(playerid, 0xFFFFFFFF ); SetPlayerPos(playerid, -1421.3221,-287.5208,14.1484); return 1; }
Код:
AddPlayerClass(299,-1421.3221,-287.5208,14.1484,138.4006,0,0,0,0,0,0);
Код:
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, -1421.3221,-287.5208,14.1484); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; }