• 05 Juin 2026, 19:21:02


Auteur Sujet: Aide [/b]  (Lu 2501 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne Komolos

  • *
  • Tueur en série
  • Messages: 190
    • Voir le profil
Aide [/b]
« le: 14 Octobre 2010, 22:32:05 »
Bonjour,
J'ai commencé une commande met je n'arrive pas à la faire confonctionné correctement...
Ce que j'aimerai faire si on tape /adminservice on devient administrateur en jeu et donc plus joueur donc normalement ça devrai faire administrateur dit etc...
Si on as pas tapé /adminservice : joueur dit etc....

voici la commande :

if(strcmp(cmd, "/b", true) == 0)//CHAT HRP BY ERIK
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Vous devez d'abord ouvrir une session !");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "CMD: /b [Chat HRP]");
return 1;
}
if(FindIP(result)) /// Anti-Pub
    {
        SendClientMessage(playerid, COLOR_RED, "[Anti-PUB] Vous avez été kické pour avoir fait une pub ");
        new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "[Anti-PUB] %s a été expulsé de la ville. Raison: Pub",advertiser);
SendClientMessageToAll(COLOR_LIGHTRED,string);
BanLog(string);
          Ban(playerid);
        return 1;
  }
            format(string, sizeof(string), "%s dit:((  %s ))",sendername, result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);

    if (AdminDuty[playerid] == 1 )
{
            format(string, sizeof(string), "Administrateur dit:((  %s ))", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);

         }
}
return 1;
}

Hors ligne Komolos

  • *
  • Tueur en série
  • Messages: 190
    • Voir le profil
Re : Aide [/b]
« Réponse #1 le: 16 Octobre 2010, 21:08:46 »
Up plz

Hors ligne dydjyz

  • *
  • Bandit
  • Messages: 278
    • Voir le profil
    • OriginalRP - SAMP
Re : Aide [/b]
« Réponse #2 le: 16 Octobre 2010, 22:41:07 »
J'ai rien compris...

Hors ligne Komolos

  • *
  • Tueur en série
  • Messages: 190
    • Voir le profil
Re : Aide [/b]
« Réponse #3 le: 17 Octobre 2010, 10:31:48 »
Enfaite si je tape /adminservice puis /b on voit :

Komolos dit : Salut
Administrateur dit : Salut

On voit les 2

J'aimerai que quand on tape la commande, on voit que Administrateur dit :

Hors ligne dydjyz

  • *
  • Bandit
  • Messages: 278
    • Voir le profil
    • OriginalRP - SAMP
Re : Re : Aide [/b]
« Réponse #4 le: 17 Octobre 2010, 11:17:58 »

Hors ligne Komolos

  • *
  • Tueur en série
  • Messages: 190
    • Voir le profil
Re : Aide [/b]
« Réponse #5 le: 17 Octobre 2010, 13:01:55 »
[code]Comme ça
[code]
if(strcmp(cmd, "/b", true) == 0)//CHAT HRP BY ERIK
{
   if(IsPlayerConnected(playerid))
   {
       if(gPlayerLogged[playerid] == 0)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Vous devez d'abord ouvrir une session !");
           return 1;
       }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "CMD: /b [Chat HRP]");
return 1;
}
if(FindIP(result)) /// Anti-Pub
     {
         SendClientMessage(playerid, COLOR_RED, "[Anti-PUB] Vous avez été EXILER pour avoir fait une pub ");
         new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "[Anti-PUB] %s a été EXILER de la ville. Raison: Pub",advertiser);
SendClientMessageToAll(COLOR_LIGHTRED,string);
BanLog(string);
       Ban(playerid);
         return 1;
  }
            format(string, sizeof(string), "%s dit:((  %s ))",sendername, result);
            SetPlayerChatBubble(playerid, string, COLOR_WHITE, 100.0, 10000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);

}
return 0;
   {
   if (AdminDuty[playerid] == 1 )
{
new result[64];
            format(string, sizeof(string), "Administrateur dit:((  %s ))", result);
            SetPlayerChatBubble(playerid, string, COLOR_WHITE, 100.0, 10000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);

         }
}
return 1;
}

Ou a la fin

new result[64];
            format(string, sizeof(string), "Administrateur dit:((  %s ))", result);
            SetPlayerChatBubble(playerid, string, COLOR_WHITE, 100.0, 10000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);

         }
}
return 0;
}
[/code][/code]
« Modifié: 19 Octobre 2010, 12:41:02 par Komolos »

Hors ligne Komolos

  • *
  • Tueur en série
  • Messages: 190
    • Voir le profil
Re : Aide [/b]
« Réponse #6 le: 19 Octobre 2010, 12:40:40 »
Petit up
Merci d'avance =D

Hors ligne scott1

  • *
  • Gangster
  • Messages: 1440
    • Voir le profil
Re : Aide [/b]
« Réponse #7 le: 19 Octobre 2010, 13:19:51 »
Fait


if (AdminDuty[playerid] == 1 )
{
   ton texte
}
else
{
 ton texte quand il est pas en admin
}
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 dydjyz

  • *
  • Bandit
  • Messages: 278
    • Voir le profil
    • OriginalRP - SAMP
Re : Re : Aide [/b]
« Réponse #8 le: 19 Octobre 2010, 14:54:09 »
[code]Comme ça
[code]
if(strcmp(cmd, "/b", true) == 0)//CHAT HRP BY ERIK
{
   if(IsPlayerConnected(playerid))
   {
       if(gPlayerLogged[playerid] == 0)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Vous devez d'abord ouvrir une session !");
           return 1;
       }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "CMD: /b [Chat HRP]");
return 1;
}
if(FindIP(result)) /// Anti-Pub
     {
         SendClientMessage(playerid, COLOR_RED, "[Anti-PUB] Vous avez été EXILER pour avoir fait une pub ");
         new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "[Anti-PUB] %s a été EXILER de la ville. Raison: Pub",advertiser);
SendClientMessageToAll(COLOR_LIGHTRED,string);
BanLog(string);
       Ban(playerid);
         return 1;
  }
        if(AdminDuty[playerid] == 0)
      {
            format(string, sizeof(string), "%s dit:((  %s ))",sendername, result);
            SetPlayerChatBubble(playerid, string, COLOR_WHITE, 100.0, 10000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
return 1;
                 }
}
return 0;
   {
  else if (AdminDuty[playerid] == 1 )
{
new result[64];
            format(string, sizeof(string), "Administrateur dit:((  %s ))", result);
            SetPlayerChatBubble(playerid, string, COLOR_WHITE, 100.0, 10000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);

         }
}
return 1;
}

Ou a la fin

new result[64];
            format(string, sizeof(string), "Administrateur dit:((  %s ))", result);
            SetPlayerChatBubble(playerid, string, COLOR_WHITE, 100.0, 10000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);

         }
}
return 0;
}
[/code][/code]

Sa devrait marcher jpense

Hors ligne Komolos

  • *
  • Tueur en série
  • Messages: 190
    • Voir le profil
Re : Aide [/b]
« Réponse #9 le: 19 Octobre 2010, 16:11:37 »
J'ai fait comme ça sa n'as pas marché :'(

EDIT: je teste ^^'

Hors ligne dydjyz

  • *
  • Bandit
  • Messages: 278
    • Voir le profil
    • OriginalRP - SAMP
Re : Aide [/b]
« Réponse #10 le: 19 Octobre 2010, 16:14:16 »
Donne les erreur si sa marche pas

Hors ligne Komolos

  • *
  • Tueur en série
  • Messages: 190
    • Voir le profil
Re : Aide [/b]
« Réponse #11 le: 19 Octobre 2010, 17:06:25 »
J'ai fait comme vous avez dit sa n'as pas marché, j'ai essayé ça comme ça à marché :

if(strcmp(cmd, "/b", true) == 0)//CHAT HRP BY ERIK
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Vous devez d'abord ouvrir une session !");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "CMD: /b [Chat HRP]");
return 1;
}
if(FindIP(result)) /// Anti-Pub
    {
        SendClientMessage(playerid, COLOR_RED, "[Anti-PUB] Vous avez été ÉXILER pour avoir fait une pub ");
        new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "[Anti-PUB] %s a été ÉXILER de la ville. Raison: Pub",advertiser);
SendClientMessageToAll(COLOR_LIGHTRED,string);
BanLog(string);
          Ban(playerid);
        return 1;
  }
        if(AdminDuty[playerid] == 0)
      {
            format(string, sizeof(string), "%s dit:((  %s ))",sendername, result);
            SetPlayerChatBubble(playerid, string, COLOR_WHITE, 100.0, 10000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
    if (AdminDuty[playerid] == 1 )
{
            format(string, sizeof(string), "Administrateur dit:((  %s ))", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);

         }
}
return 1;
}

Maintenant j'ai un autre problème j'aimerai savoir comment supprimé le Speudo, une fois en AdminDuty.

Hors ligne Komolos

  • *
  • Tueur en série
  • Messages: 190
    • Voir le profil
Re : Aide [/b]
« Réponse #12 le: 19 Octobre 2010, 17:19:17 »
Merci Dizzy ^^'