• 24 Avril 2025, 01:34:28


Auteur Sujet: Result qui marche pas  (Lu 945 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne Leonidas300

  • *
  • Bandit
  • Pawno-Amateur, a déjà crée plusieurs système
  • Messages: 301
    • Voir le profil
Result qui marche pas
« le: 20 Août 2010, 23:48:18 »
Salut
Voila, j'aimerais que le joueur puisse voir le message qu'il a envoyé, donc voila le code de mon Report-Menu :

Code: (pawn) [Sélectionner]
if(dialogid == REPORTMENU)
{
if(response)
        {
        new str[160];
        new result[64];
    GetPlayerName(playerid, str, MAX_PLAYER_NAME);
            for (new i = 0; i < MAX_PLAYER_NAME; i++)
            if (str[i] == '_')
            str[i] = ' ';
format(str, sizeof(str), "(ID:%d)%s Report: %s",playerid, str, (inputtext));
ABroadCast(COLOR_YELLOW,str,1);
SendClientMessage(playerid, COLOR_YELLOW, "Report: %s", (result));

}
}




Zombi PAWN,Créateur de *** ****** ********* !

Cherche hébérgement SA:MP! [PM Moi]
Merci à vous

Hors ligne Brian Turner

  • PAWN/PHP/SQL/MAP/SQUIRIEL
  • *
  • Bandit
  • Messages: 438
    • Voir le profil
Re : Result qui marche pas
« Réponse #1 le: 20 Août 2010, 23:55:44 »
Salut
Voila, j'aimerais que le joueur puisse voir le message qu'il a envoyé, donc voila le code de mon Report-Menu :

Code: (pawn) [Sélectionner]
if(dialogid == REPORTMENU)
{
if(response)
        {
        new str[160];
        new result[64];
    GetPlayerName(playerid, str, MAX_PLAYER_NAME);
            for (new i = 0; i < MAX_PLAYER_NAME; i++)
            if (str[i] == '_')
            str[i] = ' ';
format(str, sizeof(str), "(ID:%d)%s Report: %s",playerid, str, (inputtext));
ABroadCast(COLOR_YELLOW,str,1);
SendClientMessage(playerid, COLOR_YELLOW, "Report: %s", (result));

}
}

Perso je croix que ta pas vraiment cherché... c'est tout bete :
Code: (pawn) [Sélectionner]
SendClientMessage(playerid, COLOR_YELLOW, "Report: %s", (inputtext));
Momoto33127
__________________________________________
[TRADUCTION][FS]Celular call 1.5 : Voir le poste
[ADDON/INC]Motor System (/clef et /vsortir pour Gveh) : Voir le poste
[FS]BanList (BlackListe) [Systeme de BAN] : Voir le poste

Hors ligne scott1

  • *
  • Gangster
  • Messages: 1440
    • Voir le profil
Re : Result qui marche pas
« Réponse #2 le: 21 Août 2010, 00:29:33 »
Tu définis une string mais tu n'insère rien dedans ( result ) alors au moment de l'envoi ben il n'y a rien a envoyer.
Refait un Game mode a partir d'une page blanche



Mes partages:

Systeme de Radio avec Frequence Création

Ajouter des véhicule dans le LARP - Godfather Tuto

Anti Cheat "JunkBuster" traduit en FR Traduction

LARP Traduit FR, V0.3 Traduction

Hors ligne Leonidas300

  • *
  • Bandit
  • Pawno-Amateur, a déjà crée plusieurs système
  • Messages: 301
    • Voir le profil
Re : Result qui marche pas
« Réponse #3 le: 21 Août 2010, 11:49:00 »
Merci mais sa me fait deux warning
Code: (pawn) [Sélectionner]
C:DOCUME~1MamanMESDOC~1\_FR_LO~1GAMEMO~1LS-RP-V2.PWN(3868) : warning 202: number of arguments does not match definition
Code: (pawn) [Sélectionner]
if(dialogid == REPORTMENU)
{
if(response)
        {
        new str[160];
    GetPlayerName(playerid, str, MAX_PLAYER_NAME);
            for (new i = 0; i < MAX_PLAYER_NAME; i++)
            if (str[i] == '_')
            str[i] = ' ';
format(str, sizeof(str), "(ID:%d)%s Report: %s",playerid, str, (inputtext));
ABroadCast(COLOR_YELLOW,str,1);
SendClientMessage(playerid, COLOR_YELLOW, "Report Envoyé!");
SendClientMessage(playerid, COLOR_YELLOW, "Report: %s", (inputtext));

}
}
if(dialogid == QUESTIONSMENU)
{
    if(response)
        {
        new str[160];
    GetPlayerName(playerid, str, MAX_PLAYER_NAME);
            for (new i = 0; i < MAX_PLAYER_NAME; i++)
            if (str[i] == '_')
            str[i] = ' ';
format(str, sizeof(str), "(ID:%d)%s Question: %s",playerid, str, (inputtext));
ABroadCast(COLOR_YELLOW,str,1);
SendClientMessage(playerid, COLOR_YELLOW, "Question: %s", (inputtext));

}
}

Double post
Edit : sa me fait crash le serveur IG qunad j'envoie un msg dans le menu report ou question

Double post
Edit: J'ai fait un Format, je vais voir si sa marche, en tout cas les warning sont partis
« Modifié: 21 Août 2010, 11:53:34 par Leonidas300 »




Zombi PAWN,Créateur de *** ****** ********* !

Cherche hébérgement SA:MP! [PM Moi]
Merci à vous

Hors ligne Lychaos

  • *
  • Tueur en série
  • Messages: 165
    • Voir le profil
Re : Result qui marche pas
« Réponse #4 le: 21 Août 2010, 11:54:27 »
SendClientMessage(playerid, COLOR_YELLOW, "Report: %s", (inputtext));

on ne met pas de %s dans un Send Client Message

Faut le faire via un format

ex:
format(str, sizeof(str), " Report: %s", (inputtext));
SendClientMessage(playerid, COLOR_YELLOW, "Report: %s", (inputtext));

Hors ligne Leonidas300

  • *
  • Bandit
  • Pawno-Amateur, a déjà crée plusieurs système
  • Messages: 301
    • Voir le profil
Re : Result qui marche pas
« Réponse #5 le: 21 Août 2010, 11:57:20 »
J'ai edit pour dire que j'avais fait un format et regler le problème, mais merci à tous quand même, j'y suis arriver, en mettant un Format:

Code: (pawn) [Sélectionner]
format(string, sizeof(string), "Report: %s", (inputtext));
SendClientMessage(playerid, COLOR_YELLOW, string);

Fin du sujet x)




Zombi PAWN,Créateur de *** ****** ********* !

Cherche hébérgement SA:MP! [PM Moi]
Merci à vous