I have any error with my /save cmd
#1

I have started my Debug FS and have error with /Save cmd.
pawn Код:
#include <a_samp>
#include <file>
#define COLOR_SERVER 0xFF6666FF
new Float:X[MAX_PLAYERS], Float:Y[MAX_PLAYERS], Float:Z[MAX_PLAYERS], Float:A[MAX_PLAYERS], Float:I[MAX_PLAYERS];
new S[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
    new File:hFile;
    new string[128];
    if(strcmp("/SavPos", cmdtext, true) == 0)
    {
        S[playerid] = (GetPlayerSkin(playerid));
        GetPlayerPos(playerid, X[playerid], Y[playerid], Z[playerid]);
        GetPlayerFacingAngle(playerid, A[playerid]);
        I[playerid] = (GetPlayerInterior(playerid));
        hFile = fopen("AddPlayerClass.log", io_append);
        format(string, sizeof(string), "AddPlayerClass(%s, %s, %s, %s, %s, 0, 0, 0, 0, 0, 0); //Interior: %s", S, X, Y, Z, A, I);
        fwrite(hFile, string);
        fclose(hFile);
        SendClientMessage(playerid, COLOR_SERVER, "Your position was saved.");
        SendClientMessage(playerid, COLOR_SERVER, string);
        return 1;
    }
    return 0;
}
Result: AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); //Interior: 0

PD: If i have gramatical error in my FS or in the post, say it to me at MP please, i don't speak very English. MP.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)