[Pedido] Save para usuarios
#3

pawn Код:
#include <a_samp>
#include <GetVehicleColor>


public OnPlayerCommandText(playerid, cmdtext[] ) {

    if (!strcmp("/save2", cmdtext)) {

        new Float: Pos[4], Cor1, Cor2, cStr[128];

        GetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2] );
        GetVehicleZAngle(GetPlayerVehicleID(playerid), Pos[3] );
        GetVehicleColor(GetPlayerVehicleID(playerid), Cor1, Cor2);
       
        new File: Cars = fopen("carros.ini", io_append);
        format(cStr, sizeof cStr, "AddStaticVehicle(%i, %f, %f, %f, %f, %i, %i);\r\n", GetVehicleModel(GetPlayerVehicleID(playerid)), Pos[0], Pos[1], Pos[2], Pos[3], Cor1, Cor2);
        fwrite(Cars, cStr);
        fclose(Cars);
        return true;
    }

    return true;
}
Necessita de:https://sampforum.blast.hk/showthread.php?tid=235398

E й necessбrio estar dentro de um veнculo.
Reply


Messages In This Thread
Save para usuarios - by R4ndonsG4mers - 27.07.2013, 23:12
Re: Save para usuarios - by PT - 27.07.2013, 23:21
Re: Save para usuarios - by Gii - 27.07.2013, 23:28
Re: Save para usuarios - by R4ndonsG4mers - 27.07.2013, 23:29
Re: Save para usuarios - by R4ndonsG4mers - 28.07.2013, 00:31

Forum Jump:


Users browsing this thread: 4 Guest(s)