GetPlayerFacingAngle(playerid, Angle) HELP!!!!!!
#1

So here is what is going on: each time dini saves player`s facing angle, it somehow gets 1.000000 everytime so when i reconnect my player spawns and looks at 1.000000 direction HERE IS CODE:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new name[MAX_PLAYER_NAME], file[256], Float:X, Float:Y, Float:Z, Float:Angle;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if(gPlayerLogged[playerid] == 1)
    {
        dini_IntSet(file, "Skin", GetPlayerSkin(playerid));
        dini_IntSet(file, "Cash", GetPlayerMoney(playerid));
        dini_FloatSet(file, "PosX", X);
        dini_FloatSet(file, "PosY", Y);
        dini_FloatSet(file, "PosZ", Z);
        dini_IntSet(file, "Facing Angle", floatround(GetPlayerFacingAngle(playerid, Angle), floatround_ceil));
    }
    gPlayerLogged[playerid] = 0;

    new String_Leaving[64], Name_Left[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name_Left,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(String_Leaving,sizeof String_Leaving,"[SERVER]: %s left the server. (Timed out)",Name_Left);
        case 1: format(String_Leaving,sizeof String_Leaving,"[SERVER]: %s left the server. (Leaving)",Name_Left);
        case 2: format(String_Leaving,sizeof String_Leaving,"[SERVER]: %s left the server. (Kicked/Banned)",Name_Left);
    }
    SendClientMessageToAll(COLOR_YELLOW,String_Leaving);
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)