SA-MP Forums Archive
[HELP] dini to y_ini - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] dini to y_ini (/showthread.php?tid=462191)



[HELP] dini to y_ini - Luca12 - 05.09.2013

Hello everyone please can you tell me how can I this move to y_ini from dini? Thanks

pawn Код:
CMD:utrkacp(playerid, params[])
{
    if(GetPVarInt(playerid,"RaceIzrada") == 1)
    {
        new Float:X, Float:Y, Float:Z;
        new utrkaFile[512];
        new string[256], zadnjicp, Float:radius, prolaz, idcpa, krug;
        if(sscanf(params,"ifiii",zadnjicp, radius, prolaz,krug, idcpa)) return SCM(playerid, COLOR_GRAD,"{FFAF00}Koristite: {FFFFFF}/utrkacp [zadnji CP? 1-DA, 0-Ne] [radius CP-a] [PROLAZ? 1-DA, 0-Ne] [KRUG? 1-DA, 0-NE] [ID CP-a]");
        if(zadnjicp > 1) return SCM(playerid, 0xadaeadFF," Zadnji CP krivi iznos! 1-DA, 0-NE!");
        if(prolaz > 1) return SCM(playerid, 0xadaeadFF," Prolaz krivi iznos! 1-DA, 0-NE!");
        if(zadnjicp < 0) return SCM(playerid, 0xadaeadFF," Zadnji CP krivi iznos! 1-DA, 0-NE!");
        if(prolaz < 0) return SCM(playerid, 0xadaeadFF," Prolaz krivi iznos! 1-DA, 0-NE!");
        if(idcpa > 40000) return SCM(playerid, 0xadaeadFF," Krivi id CP-a!");
        if(radius > 20) return SCM(playerid, 0xadaeadFF," Krivi radius! Raspon: od 5.0 do 20.0");
        if(radius < 5) return SCM(playerid, 0xadaeadFF," Krivi radius! Raspon: od 5.0 do 20.0");
        format(utrkaFile, sizeof(utrkaFile),"/utrke/%s.UTRKA","Utrka nije ucitana!");
        dini_Create(utrkaFile);
        if(IsPlayerInAnyVehicle(playerid))
        {
            GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
            format(string, sizeof(string),"CP_%d_PosX", idcpa), dini_FloatSet(utrkaFile, string, X);
            format(string, sizeof(string),"CP_%d_PosY", idcpa), dini_FloatSet(utrkaFile, string, Y);
            format(string, sizeof(string),"CP_%d_PosZ", idcpa), dini_FloatSet(utrkaFile, string, Z);
            format(string, sizeof(string),"CP_%d_Prolaz", idcpa), dini_IntSet(utrkaFile, string, prolaz);
            format(string, sizeof(string),"CP_%d_Krug", idcpa), dini_IntSet(utrkaFile, string, krug);
            if(zadnjicp == 1)
            {
                dini_IntSet(utrkaFile,"Zadnji_CP", idcpa);
            }
            dini_FloatSet(utrkaFile,"CP_Radius", radius);
        }
        new hIme[MAX_PLAYER_NAME];
        RPIme(playerid,hIme);
        dini_Set(utrkaFile,"Rekorder", "Nitko");
        dini_IntSet(utrkaFile, "RekordMinuti", 59);
        dini_IntSet(utrkaFile, "RekordSekunde", 59);
        dini_IntSet(utrkaFile, "BrojCP", idcpa);
        format(string, sizeof(string),"CP[%s] CPid[%d] X[%.4f] Y[%.4f] Z[%.4f] R[%.2f] Z?[%d] PR?[%d] KR?[%d]", hIme, idcpa, X, Y, Z, radius, zadnjicp, prolaz, krug);
        SendAdminMessage(COLOR_YELLOW, string);
    }
    else return SendClientMessage(playerid, 0xC3C3C3FF,"{FFFFFF}[{F81414}G-Unit{FFFFFF}] {C3C3C3}ODBIJENO!");
    return 1;
}



Re: [HELP] dini to y_ini - Luca12 - 06.09.2013

Please anyone? Thanks


Re: [HELP] dini to y_ini - ArkoUK - 06.09.2013

Quote:
Originally Posted by Luca12
Посмотреть сообщение
Please anyone? Thanks
Y_Ini and dini are quite similar, I would recommend looking at both of there documentation and go on from there.


Re: [HELP] dini to y_ini - Luca12 - 07.09.2013

Ayone?Thanks