• 08 Avril 2025, 19:57:15


Voir les contributions

Cette section vous permet de consulter les contributions (messages, sujets et fichiers joints) d'un utilisateur. Vous ne pourrez voir que les contributions des zones auxquelles vous avez accès.


Messages - DarkZeroX

Pages: [1]
1
Scripting SA-MP [Pawn center] / Re : Problème chargement
« le: 04 Novembre 2013, 19:11:59 »
Ce code consiste à chargé des intérieurs (qui son tous dans le même fichier) pour ensuite les sauvegardé dans des variables. Et j'ai remarqué que dès le premier FLOAT ce charge la fonction crash tout. Si je met un PRINTF après le premier FLOAT la console crash complétement 'SCRIPT' = le nom du fichier en #define
public chargerScriptInt()
{
printf("Okei1");
if(fexist(SCRIPT)) // Si le fichier existe.
  {
                printf("Okei2");
  new File:intFiles = fopen(SCRIPT, io_read); // On l'ouvre
  printf("Okei3");
  new intstring[512];
  printf("Okei4");
  static Field[32][64];
  printf("Okei5");
    while(fread(intFiles, intstring, sizeof(intstring)))
    {
                    printf("Okei6");
          if(split2(intstring, Field, '|') == 10)
        {
    Info_Interieur[interieursCharges][pX] = floatstr(Field[0]);
                         // ICI SA CRASH SI JE MET UN PRINTF ET SI JE LAISSE COMME SA LA FONCTION CRASH
                   Info_Interieur[interieursCharges][pY] = floatstr(Field[1]);
    Info_Interieur[interieursCharges][pZ] = floatstr(Field[2]);
             Info_Interieur[interieursCharges][preA] = floatstr(Field[3]);
    Info_Interieur[interieursCharges][pInt] = strval(Field[4]);
         format(Info_Interieur[interieursCharges][info], MAX_PLAYER_NAME*3, "%s", Field[5]);
    interieursCharges++;
    printf("Interieur chargé : %f %f %f",Info_Interieur[interieursCharges][pX],Info_Interieur[interieursCharges][pY],Info_Interieur[interieursCharges][pZ]);
         }
}
}
        fclose(intFiles);
}

2
Scripting SA-MP [Pawn center] / Problème chargement
« le: 04 Novembre 2013, 18:57:40 »
Salut,
j'ai un problème avec le chargement ça crash al fonction au premier pX

public chargerScriptInt()
{
printf("Okei1");
if(fexist(SCRIPT))
  {
                printf("Okei2");
  new File:intFiles = fopen(SCRIPT, io_read);
  printf("Okei3");
  new intstring[512];
  printf("Okei4");
  static Field[32][64];
  printf("Okei5");
    while(fread(intFiles, intstring, sizeof(intstring)))
    {
                    printf("Okei6");
          if(split2(intstring, Field, '|') == 10)
        {
    Info_Interieur[interieursCharges][pX] = floatstr(Field[0]);
                   Info_Interieur[interieursCharges][pY] = floatstr(Field[1]);
    Info_Interieur[interieursCharges][pZ] = floatstr(Field[2]);
             Info_Interieur[interieursCharges][preA] = floatstr(Field[3]);
    Info_Interieur[interieursCharges][pInt] = strval(Field[4]);
         format(Info_Interieur[interieursCharges][info], MAX_PLAYER_NAME*3, "%s", Field[5]);
    interieursCharges++;
    printf("Interieur chargé : %f %f %f",Info_Interieur[interieursCharges][pX],Info_Interieur[interieursCharges][pY],Info_Interieur[interieursCharges][pZ]);
         }
}
}
        fclose(intFiles);
}

3
Salut, je sais que je poste pas mal de demande d'aide mais le forum est fait pour ça non?^^

Alors voilà, j'ai fais un système de 'CacheVeh' tout les véhicules qui non aucun rapport avec le système de véhicule auront 'CacheVeh[IDVEH] = -1' et tout les autres il auront en IDVEH bah l'id du véhicule dite par le serveur et après en = il auront de 0 au nombre de véhicule genre

CacheVeh[12] = 0;
CacheVeh[13] = 1;
CacheVeh[14] = 2;
CacheVeh[15] = 3;


Mais malheureusement ça marche mais après quand je fais 'V_Info[cacheVeh[CarLoad]][V_Moteur]' ça fonctionne pas regarder


cacheVeh[C] = CarLoad;
printf("CacheVeh[C] = %d | VLoad = %d | Proprio: %s | Moteur: %d",cacheVeh[C],VLoad,V_Info[i][V_Proprio],V_Info[i][V_Moteur]);
printf("Moteur avec CacheVeh : %d, Proprio: %s",V_Info[cacheVeh[CarLoad]][V_Moteur],V_Info[cacheVeh[CarLoad]][V_Proprio]);


ça fonctionne que pour le premier véhicule après plus rien voici le code.

public Vehicule_Load()
{
new fichier[128];
new C,Count,CarLoad;
        for(new i; i < MAX_VEHICLES; i++)
        {
            if(IsValidVehicle(i)) Count++;
        }
        CarLoad = Count;
for(new i = 0; i < MAX_VEHICULES; i++)
{
format(fichier, 128, "_veh/%d.ini", i);
if(fexist(fichier))
{
V_Info[i][V_SpawnX] = dini_Float(fichier, "SpawnX");
V_Info[i][V_SpawnY] = dini_Float(fichier, "SpawnY");
V_Info[i][V_SpawnZ] = dini_Float(fichier, "SpawnZ");
V_Info[i][V_SpawnA] = dini_Float(fichier, "SpawnA");
V_Info[i][V_Model]      = dini_Int(fichier, "Model");
V_Info[i][V_Couleur1]      = dini_Int(fichier, "Couleur1");
V_Info[i][V_Couleur2]      = dini_Int(fichier, "Couleur2");
V_Info[i][V_Type]      = dini_Int(fichier, "Type");
V_Info[i][V_Prix]      = dini_Int(fichier, "Prix");
V_Info[i][V_Essence]      = dini_Int(fichier, "Essence");
V_Info[i][V_Moteur]      = dini_Int(fichier, "Moteur");
format(V_Info[i][V_Plaque], MAX_PLAYER_NAME, dini_Get(fichier, "Plaque"));
format(V_Info[i][V_Proprio], MAX_PLAYER_NAME, dini_Get(fichier, "Proprio"));
V_Info[i][V_Huile] = dini_Float(fichier, "Huile");
V_Info[i][V_Batterie] = dini_Float(fichier, "Batterie");
V_Info[i][V_Phares] = dini_Int(fichier, "Phares");
V_Info[i][V_Fourriere] = dini_Int(fichier, "Fourriere");
V_Info[i][V_Alarmes] = dini_Int(fichier, "Alarmes");
V_Info[i][V_Portes] = dini_Int(fichier, "Portes");
V_Info[i][V_Etat] = dini_Float(fichier, "Etat");
V_Info[i][V_ControleTechnique] = dini_Int(fichier, "ControleTechnique");
V_Info[i][V_Pneu] = dini_Float(fichier, "Pneu");
V_Info[i][V_Kilometrage] = dini_Float(fichier, "Kilometrage");
V_Info[i][V_LocationTemps] = dini_Int(fichier, "LocationTemps");
format(V_Info[i][V_Location], MAX_PLAYER_NAME, dini_Get(fichier, "Location"));
C = CreateVehicle(V_Info[i][V_Model], V_Info[i][V_SpawnX],V_Info[i][V_SpawnY],V_Info[i][V_SpawnZ],V_Info[i][V_SpawnA], V_Info[i][V_Couleur1], V_Info[i][V_Couleur2], -1);
                        SetVehicleParamsDef(i, V_Info[i][V_Moteur], V_Info[i][V_Phares], V_Info[i][V_Alarmes],V_Info[i][V_Portes]);
                        SetVehicleHealth(i,V_Info[i][V_Etat]);
                        cacheVeh[C] = CarLoad;
        printf("CacheVeh[C] = %d | VLoad = %d | Proprio: %s | Moteur: %d",cacheVeh[C],VLoad,V_Info[i][V_Proprio],V_Info[i][V_Moteur]);
        printf("Moteur avec CacheVeh : %d, Proprio: %s",V_Info[cacheVeh[CarLoad]][V_Moteur],V_Info[cacheVeh[CarLoad]][V_Proprio]);
VLoad++;
CarLoad++;
   }
    }

    return 1;
}


[12:48:24] CacheVeh[C] = 14 | VLoad = 0 | Proprio: Max_Anderson | Moteur: 1
[12:48:24] Moteur avec CacheVeh : 1, Proprio: Max_Anderson

[12:48:24] CacheVeh[C] = 15 | VLoad = 1 | Proprio: Max_Anderson | Moteur: 1
[12:48:24] Moteur avec CacheVeh : 0, Proprio:

[12:48:24] CacheVeh[C] = 16 | VLoad = 2 | Proprio: Aucun | Moteur: 0
[12:48:24] Moteur avec CacheVeh : 0, Proprio:

[12:48:24] CacheVeh[C] = 17 | VLoad = 3 | Proprio: Aucun | Moteur: 0
[12:48:24] Moteur avec CacheVeh : 0, Proprio:

[12:48:24] CacheVeh[C] = 18 | VLoad = 4 | Proprio: Max_Anderson | Moteur: 1
[12:48:24] Moteur avec CacheVeh : 0, Proprio:

Merci^^

6
Scripting SA-MP [Pawn center] / Re : Trois problème
« le: 12 Août 2013, 20:20:03 »
UP

7
Scripting SA-MP [Pawn center] / Re : Poubelle problème
« le: 12 Août 2013, 20:19:54 »
UP

8
C'est un trucking (chez pas comment on écrit) en gros le deuxième?

10
Scripting SA-MP [Pawn center] / Re : Poubelle problème
« le: 11 Août 2013, 22:19:42 »
En gros,
Quand je charge les poubelles aucune poubelle n'a de slots. Mais il suffit que je /creerpoubelle et tout les poubelle on de nouveau 5 slots

11
Scripting SA-MP [Pawn center] / Trois problème
« le: 11 Août 2013, 19:32:40 »
Salut,

Problème 1)

J'ai un problème j'utilise la fonction "AddItem" pour ajouté un objet à mon inventaire ("AddItem(playerid,"Nom",Quantiter);" quand elle autre part que dans le FS de l'inventaire, elle marche pas.

"lsrpInv_AddItem(playerid,ItemName[],Amount)"
Dans l'include que j'ai pour relié tout les système
"#define AddItem(%0,%1,%2) \
CallRemoteFunction("lsrpInv_AddItem", "isd", %0, (%1), %2)"



Problème 2


Quand j'ai crée mon petit truc pour que ça détecte l'ID de l'objet en fonction du nom ça marche mais malheureusement ça veux pas me crée l'objet une fois In Game, ça fait crash la fonction.

stock ObjetInfo[][] =
{
  {0,"Mauvais ID"},
  {18645,"Casque"},
  {19171,"Guide de Los Santos"},
  {2894,"Contract de location"}
};


stock createFloatEx(const floatid)
{
    FloatInfo[floatid][fObject] = CreateObject(ObjetInfo[FloatInfo[floatid][fItemName]][0],FloatInfo[floatid][fX],FloatInfo[floatid][fY],FloatInfo[floatid][fZ], 0.0, 0.0, 96.0);
    cacheAltFloat[FloatInfo[floatid][fObject]] = floatid;
    format(stringtmp, TAILLE_STRING_CLASSIC, Orange_SAMP"%s\n"Blanc_SAMP"Appuyez sur Alt G. pour ramasser l'item", FloatInfo[floatid][fItemName]);
    FloatInfo[floatid][fText] = Create3DTextLabel(stringtmp,Couleur_Blanche,FloatInfo[floatid][fX],FloatInfo[floatid][fY],FloatInfo[floatid][fZ],5.0,FloatInfo[floatid][fVW],false);
}

(c'est l'id de l'objet qui fait tout crash je crois)

Problème 3

 Alors lui je ne vois pas du-tout j'ai crée un système de question dynamique, mais par exemple si la phares est

"Pour faire ce"....

Il m'affiche

"Pour Vous Pour faire ce" ....


    idquestion[playerid] = random(6);
    new stringtmp[128],question[64][5],reponse1[64][5],reponse2[64][5],reponse3[64][5];
    format(stringtmp,250, "questions/%d.ini", IDJOB[playerid]);
    if(!fexist(stringtmp))
    {
           SendPlayerMessage(playerid, "{008DF9}Erreur","Le fichier n'existe pas");
   return 1;
    }
    question[0] = "";
    question[1] = "";
    question[2] = "";
    question[3] = "";
    question[4] = "";
    dfile_Open(stringtmp);
    format(question[0], 129, dfile_ReadString("[1]Question"));
    format(reponse1[0], 129, dfile_ReadString("[1]Reponse1"));
    format(reponse2[0], 129, dfile_ReadString("[1]Reponse2"));
    format(reponse3[0], 129, dfile_ReadString("[1]Reponse3"));
    ValidRep[playerid][0] = dfile_ReadInt("[1]ReponseValide");

    format(question[1], 129, dfile_ReadString("[2]Question"));
    format(reponse1[1], 129, dfile_ReadString("[2]Reponse1"));
    format(reponse2[1], 129, dfile_ReadString("[2]Reponse2"));
    format(reponse3[1], 129, dfile_ReadString("[2]Reponse3"));
    ValidRep[playerid][1] = dfile_ReadInt("[2]ReponseValide");
   

    dialogStr = "";
    titledialog = "";
    phrasestr = "";
    format(phrasestr,sizeof(phrasestr),"%s",question[idquestion[playerid]]);
    SendPlayerMessage(playerid, Rouge_SAMP"Question", phrasestr);
 format(dialogStr,sizeof(dialogStr),"%s\n%s\n%s",question[idquestion[playerid]],reponse1[idquestion[playerid]],reponse2[idquestion[playerid]],reponse3[idquestion[playerid]]);
    format(titledialog,sizeof(titledialog),"[Teste] Note : %d/5 - Question %d",qcm_note[playerid],qcm_nbrQuest[playerid]+1);
    ShowPlayerDialog(playerid,3001,DIALOG_STYLE_LIST,titledialog,dialogStr,"Valider"," ");

Merci tout le monde

Merci d'avance.

Je sais que le script des questions n'est pas optimisé mais je le laisse comme ça. C'est le seul que je laisserai comme ça il n'est pas utilisé énormément.

12
Problèmes et bugs / Bug de lancement
« le: 01 Août 2013, 20:56:05 »
Salut dès que je lance IVMP il affiche un écran noir et se coupe direct je vois pas pourquoi j'ai essayer la béta ça marché parfaitement

-------------- Unhandled Exception Report Start --------------
Exception code: 0xC0000005 (Access Violation)
Exception address: 0x941BA790 (0x9391A790) (0x93D1A790)
Exception registers:
GS=0x0000002B FS=0x00000053 ES=0x0000002B DS=0x0000002B
EDI=0x00000000 ESI=0x04792A10 EBX=0x024E9B6A EDX=0x00000000
ECX=0x01D2BFA0 EAX=0x01436510
EBP=0x00000001 EIP=0x941BA790 CS=0x00000023 EFLAGS=0x00010202
ESP=0x222FF990 SS=0x0000002B
--------------- Unhandled Exception Report End ---------------


------------------------- Client Log -------------------------


[20:54:19] IV:MP 0.1 RC2| Dec 24 2012 - 00:38:45
[20:54:19] Game Base: 0x010A0000 (0x00CA0000)
[20:54:19] GetLocalPlayerPed Return Is Invalid (Index is -1)
[20:54:19] Applied patches
[20:54:19] Applied key sync/aim sync hooks
[20:54:19] Applied misc hooks
[20:54:19] Applied script hooks
[20:54:20] Hooked 'Direct3D Reset and EndScene
[20:54:20] Hooked 'DirectInput8Create' in 'DInput8.dll' (0x04109C90)
[20:54:20] Hooked 'XInputGetState' in 'xinput1_3.dll' (0x04109CA8)
[20:54:26] PreD3DReset
[20:54:26] DirectInput8Create Called
[20:54:26] DirectInput8Create Call Finished!
[20:54:26] GUI initialized
[20:54:27] PostD3DReset(1)
[20:54:27] DirectInput8Create Called
[20:54:27] DirectInput8Create Call Finished!
[20:54:30] C:\Jeux\GTA IV\IVMP\crashinfo/Client-Windows-0.1 RC2-2013.08.01-20.54.30.log


---------------------- Client Log End -----------------------

Merci :)

13
Scripting SA-MP [Pawn center] / Poubelle problème
« le: 26 Juillet 2013, 21:10:46 »
Salut j'ai un problème avec le chargement de mes poubelles en effet il on un coffre dynamique bref il se charge je n'est aucun slot dans les poubelles mais par contre quand je recrée une poubelle (toute les poubelle se décharge et se recharge) là j'ai mes slots disponible dans la poubelle
http://pastebin.com/rksSNf5i
Merci d'avance les amis :)

14
Scripting SA-MP [Pawn center] / Re : Problème CallRemoteFunction
« le: 26 Juillet 2013, 16:38:30 »
Je te remercie vraiment :)

15
Scripting SA-MP [Pawn center] / Problème CallRemoteFunction
« le: 26 Juillet 2013, 00:30:31 »
Salut !
Je voudrais vous parlez d'un problème que je n'arrive pas à réglé en effet j'ai pas l'habitude de CallRemoteFunction mais regardés
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
CallRemoteFunction("OnDialogResponseExV","iiiis",playerid, dialogid, response, listitem, inputtext[]);
        CallRemoteFunction("OnDialogResponseExJ","iiiis",playerid, dialogid, response, listitem, inputtext[]);

error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero

J'utilise ça car tout mes gros système son mis en FS et raccordé en include mais il arrive qu'il y est des bugs que ça marche plus et ça à résolue mes problèmes pour mes autres callback mais ça marche pas pour

Pages: [1]