SA-MP Forums Archive
[DUV] Concessionбria - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [DUV] Concessionбria (/showthread.php?tid=146911)



[DUV] Concessionбria - Gangster_ - 09.05.2010

Olб galera, entгo eu estou com um sistema de concessionбria aqui feita pelo Flбvio Toribio, tipo ta funcionando tudo perfeitamente so que eu gostaria de salvar o dono do veнculo, porque quando eu compro um veнculo no meu server quando reinicio volta como o veнculo estб sem dono pronto para comprar novamente, eu gostaria de salvar esse veнculo no nome do dono pra quando reiniciar nгo precisar comprar novamente e sim ficar salvo, eu jб tentei fazer isso mais nгo estou conseguindo tentei com DINI mais nгo funcionou, se alguem puder me ajudar vlw.


Link do filterscript concessionбria: http://www.4shared.com/file/207057048/344ce7/conce.html


Re: [DUV] Concessionбria - tshadow - 10.05.2010

Nгo sou bom com o dini mas quem for bom consegue meter este com que dк nesse:
pawn Код:
if(dini_Exists("vehs") == 0)
    {
        dini_Create("vehs");
 
        for(new i = 0; i < MAX_VEHS; i++)
        {
            new veh[5], string[128];
            format(veh, sizeof(veh), "%d", i);
 
            format(string, sizeof(string), "%s 0.0000 0.0000 5.0000 0.0000", DefaultVehOwners[i]);
            dini_Set("vehs", veh, string);
        }
    }
   
    for(new i = 0; i < MAX_VEHS; i++)
    {
        new veh[5], string[128];
        format(veh, sizeof(veh), "%d", i);
       
        if(dini_Isset("vehs", veh) == 0)
        {
            format(string, sizeof(string), "%s 0.0000 0.0000 5.0000 0.0000", DefaultVehOwners[i]);
            dini_Set("vehs", veh, string);
        }
    }
 
    for(new i = 0; i < MAX_VEHS; i++)
    {
        new Float:X, Float:Y, Float:Z, Float:A;
        new veh[5], get_veh[128], pos;
 
        for(new v = 0; v < 4; v++)
        {
            format(veh, sizeof(veh), "%d", i);
            format(get_veh, sizeof(get_veh), "%s", dini_Get("vehs", veh));
            pos = strfind(get_veh, " ", true);
            strdel(get_veh, 0, pos + 1);
       
            if(v == 0)
            {
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, pos, strlen(get_veh));
               
                X = strval(get_veh);
            }
           
            if(v == 1)
            {
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, 0, pos + 1);
               
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, pos, strlen(get_veh));
 
                Y = strval(get_veh);
            }
           
            if(v == 2)
            {
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, 0, pos + 1);
               
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, 0, pos + 1);
 
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, pos, strlen(get_veh));
 
                Z = strval(get_veh);
            }
           
            if(v == 3)
            {
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, 0, pos + 1);
 
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, 0, pos + 1);
               
                pos = strfind(get_veh, " ", true);
                strdel(get_veh, 0, pos + 1);
 
                A = strval(get_veh);
            }
        }
 
        Cars[i] = CreateVehicle(strval(VehIDs[i]), X, Y, Z, A, -1, -1, 60);
    }
[este sу grava o sitio que deixaste


Re: [DUV] Concessionбria - RoamPT - 10.05.2010

Pede apoio ao autor do filterscript.