GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: scott1 le 08 Novembre 2009, 22:40:51

Titre: SERVER unknow command
Posté par: scott1 le 08 Novembre 2009, 22:40:51
Bonsoir, re bonsoir pour certain, décidément je suis le boulet de se site, que ferais je sans vous? :D

Bon j'en viens au fait, j'ai besoin d'aide, j'ai créer cette cmd:

if(strcmp(cmd, "/recuperer1", true) == 0)
{
if(IsPlayerConnected(playerid))
  {
         if(PlayerToPoint(3.0,playerid,1106.7,-1733.5,13.7))
         {
            new keycar = PlayerInfo[playerid][pPcarkey];
            if(CarInfo[keycar][cFour] == 1)
            {
            if(PlayerInfo[playerid][pCash] >= 1500)
            {
            if(keycar != 999)
              {
                  CarInfo[keycar][cLock] = 0;
                  CarInfo[keycar][cFour] = 0;
                  new payout = 1500;
SBizzInfo[12][sbTill] += payout;
                  MoveObject(fourieregate,1101.951,-1754.209,15.267, 2.2);
                  SafeGivePlayerMoney(playerid, -1500);
                  format(string, sizeof(string), "~n~~r~-1500$");
    GameTextForPlayer(playerid, string, 5000, 1);
    SendClientMessage(playerid, COLOR_WHITE, "N'oublié pas de /v garer ce véhicule a nouveau!");
    for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pJob] == 7)
    {
        if(JobDuty[i] == 1)
    {
        new prix = 1000 / Mechanics;
        PlayerInfo[i][pAccount] += prix;
        format(string, sizeof(string), "Quelqu'un est venu récupérer sa voiture de fourriere, vous gagnez %d$", prix);
SendClientMessage(i, COLOR_WHITE, string);
}
else
{
    new prix = 1000 / Mechanics;
    format(string, sizeof(string), "Quelqu'un est venu récupérer sa voiture de fourriere.");
SendClientMessage(i, COLOR_WHITE, string);
format(string, sizeof(string), "Vous auriez gagné %d$ si vous avier été en service", prix);
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
}
return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_WHITE, "Vous n'avez pas asser d'argent ( 1.500$)!");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_WHITE, "Ce véhicule n'est pas en fourriere!");
    return 1;
}
}
}
return 1;
}

Quand un joueur récupère sa voiture (/recuperer) tout va bien, les mécanicien reçoivent le message, mais quand s'est un mécanicien qui récupere sa voiture on lui dit:

N'oublié pas de /v garer ce véhicule a nouveau!
Et juste en dessous ou il devrai y avoir Quelqu'un est venu récupérer sa voiture de fourriere, vous gagnez %d$ ou le else, on lui dit SERVER unknow commande, comment régler ceci?

Merci d'avance
Titre: Re : SERVER unknow command
Posté par: FuSion le 08 Novembre 2009, 22:52:41
Un return 0  ;)

++
FS'
Titre: Re : SERVER unknow command
Posté par: cristab le 08 Novembre 2009, 23:03:42
tente de retirer le return 1; en rouge


Citer
}
                     return 1;
                  }
               }
               else
               {
                   SendClientMessage(playerid, COLOR_WHITE, "Vous n'avez pas asser d'argent ( 1.500$)!");
                   return 1;
               }
            }
            else
            {
                  SendClientMessage(playerid, COLOR_WHITE, "Ce véhicule n'est pas en fourriere!");
                  return 1;
            }
         }
      }
      return 1;
   }
Titre: Re : Re : SERVER unknow command
Posté par: scott1 le 09 Novembre 2009, 16:58:36
Un return 0  ;)

++
FS'

Pas saisis...


Cristab je vai essayer

Double post
ça ne fonctionne pas :/

J'ai aussi cette commande

if(!strcmp(cmdtext, "/localiservehicule", true) || !strcmp(cmdtext, "/lve", true))
{
    if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pPcarkey] != 999)
{
    if(PlayerInfo[playerid][pPnumber] != 0)
    {
        new gPlayerCheckpointStatus2[MAX_PLAYERS];
        if(gPlayerCheckPointStatus2[playerid] != CHECKPOINT_CAR)
        {
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
format(string,sizeof(string),"** %s sort son telephone.",sendername);
ProxDetector(15.0,playerid,string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
Wait(5000);
SendClientMessage(playerid,COLOR_WHITE,"On-Star: Ici On Star comment puis je vous aidez?");
Wait(2000);
format(string,sizeof(string),"%s dit: [telephone] Je voudrais savoir où est mon véhicule",sendername");
    ProxDetector(15.0,playerid,string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
    Wait(2000);
SendClientMessage(playerid,COLOR_WHIE,"On-Star: D'accord Mr, Puis je avoir le numéro de plaque?");
Wait(2000);
format(string,sizeof(string),"%s tappe la plaque d'immatriculation sur son telephone",sendername);
ProxDetector(15.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Wait(2000);
SendClientMessage(playerid,COLOR_WHITE,"On-Star: D'accord Mr, l'emplacement de votre véhicule est en train d'être chargé sur votre telephone.");
Wait(500);
SendClientMessage(playerid,COLOR_WHITE,"On-Star: Si vous voulez arreter de localiser votre véhicule, appeler ce numero une deuxieme fois");
Wait(500);
SetPlayerCheckpoint(playerid,CarInfo[PlayerInfo[playerid][pPcarkey]][cLocationx], CarInfo[PlayerInfo[playerid][pPcarkey]][cLocationy], CarInfo[PlayerInfo[playerid][pPcarkey]][cLocationz], 5.0);
gPlayerCheckpointStatus2[playerid] = CHECKPOINT_CAR;
return 1;
}
else
{
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
Wait(1000);
SendClientMessage(playerid,COLOR_WHITE,"Your tracking of your vehicle has been automatically cancelled");
return 1;
}
}
else
{
    SendClientMessage(playerid,COLOR_WHITE,"Vous n'avez pas de telephone.");
}
}
else
{
GameTextForPlayer(playerid, "~w~Vous n'avez pas de vehicule a localiser", 5000, 1);
return 1;
}
}
return 1;
}

J'obtient
C:\Documents and Settings\Propriétaire\Bureau\serveur samp\LARP\bon 03a\gamemodes\LARPEPURER.pwn(24977) : error 017: undefined symbol "gPlayerCheckPointStatus2"
C:\Documents and Settings\Propriétaire\Bureau\serveur samp\LARP\bon 03a\gamemodes\LARPEPURER.pwn(24977) : warning 215: expression has no effect
C:\Documents and Settings\Propriétaire\Bureau\serveur samp\LARP\bon 03a\gamemodes\LARPEPURER.pwn(24977) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Propriétaire\Bureau\serveur samp\LARP\bon 03a\gamemodes\LARPEPURER.pwn(24977) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Propriétaire\Bureau\serveur samp\LARP\bon 03a\gamemodes\LARPEPURER.pwn(24977) : fatal error 107: too many error messages on one line

Désoler de vous emmerder. Merci d'avance