• 07 Juin 2026, 00:51:57


Auteur Sujet: Problème commande plaque  (Lu 870 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne Lucifer

  • *
  • Tueur en série
  • Messages: 199
    • Voir le profil
    • Midtown States Role Play
Problème commande plaque
« le: 12 Décembre 2010, 15:26:29 »
Bonjour,

Mon système de plaque d'immatriculation marche pas..

Quand je tape la commande : /v plaque, sa me met : SERVER:Unknow command..etc

Voici la subcmd :

if(strcmp(subcmd,"plaque",true)==0)
{
if(!PlayerToPoint(2.0,playerid, -1629.2683,682.8059,7.1901))
{
    SendClientMessage(playerid,COLOR_VEHICULE, "[Vehicule] Allez aux service des plaques, à la mairie (/carte) !");
return 1;
}
if(car_getNbrCars(playerid) < 1)
{
SendClientMessage(playerid, COLOR_VEHICULE, "[Vehicule] Vous n'avez aucun véhicule.");
return 1;
}
if(PlayerInfo[playerid][pCash] < PRIX_PLAQUE)
{
    format(string,sizeof(string),"[Info] Le changement de plaque coute %d$",PRIX_PLAQUE);
SendClientMessage(playerid, COLOR_VEHICULE, string);
return 1;
}
new car1[64]="[Vehicule 1]  Aucun",pla1[8],car2[64]="[Vehicule 2]  Aucun",pla2[8],car3[64]="[Vehicule 3]  Aucun",pla3[8];
new key1 = PlayerInfo[playerid][pPcarkey];
new key2 = PlayerInfo[playerid][pPcarkey2];
new key3 = PlayerInfo[playerid][pPcarkey3];
if(key1!=999)
{
    if(strval(VehiculeInfo[key1][Plaque])!=-1)
        {
    memcpy(pla1,VehiculeInfo[key1][Plaque],0,8*4,8*4);
    }
else
    {
pla1="Aucune";
}
    format(car1,sizeof(car1),"[Vehicule 1]  %s  -  Plaque actuelle : %s",VehicleName[GetVehicleModel(key1)-400],pla1);
}
if(key2!=999)
{
    if(strval(VehiculeInfo[key2][Plaque])!=-1)
        {
    memcpy(pla2,VehiculeInfo[key2][Plaque],0,8*4,8*4);
    }
else
    {
pla2="Aucune";
}
    format(car2,sizeof(car2),"[Vehicule 2]  %s  -  Plaque actuelle : %s",VehicleName[GetVehicleModel(key2)-400],pla2);
}
if(key3!=999)
{
    if(strval(VehiculeInfo[key3][Plaque])!=-1)
        {
memcpy(pla1,VehiculeInfo[key3][Plaque],0,8*4,8*4);
}
else
    {
pla3="Aucune";
}
    format(car3,sizeof(car3),"[Vehicule 3]  %s  -  Plaque actuelle : %s",VehicleName[GetVehicleModel(key3)-400],pla3);
}
format(string,sizeof(string),"%s \n%s \n%s",car1,car2,car3);
ShowPlayerDialog(playerid,DPLAQUE,DIALOG_STYLE_LIST,"Quelle plaque voulez vous changer ?",string,"Valider","Quitter");
return 1;
}

Ensuite, le createLabel s'affiche pas...

Voici le code :

public CreateVehicleLabel(vehicleid,playerid)
{
if(IsABike(vehicleid))
  {
  return 1;
    }
/*if(VehiculeInfo[vehicleid][cType]!=CARTYPE_BUY)
  {
return 1;
}
if(VehiculeInfo[vehicleid][cOwned]==0)
  {
  DestroyVehicleLabel(vehicleid);
    return 1;
}*/
new string[64];
if(strval(VehiculeInfo[vehicleid][FaussePlaque])!=-1)
{
format(string,sizeof(string),"Plaque : %s",VehiculeInfo[vehicleid][FaussePlaque]);
}
else if(strval(VehiculeInfo[vehicleid][Plaque])!=-1)
{
format(string,sizeof(string),"Plaque : %s",VehiculeInfo[vehicleid][Plaque]);
}
else
  {
  format(string,sizeof(string),"Plaque : Aucune");
  }
if(playerid != -1 && IsAMoto(vehicleid))
{
if(Ceinture[playerid]==1)
  {
  format(string,sizeof(string),"%s\nCasque mis",string);
}
}
if(!IsValidDynamic3DTextLabel(CarLabel[vehicleid]))
{
CarLabel[vehicleid]=CreateDynamic3DTextLabel(string,COLOR_VEHICULE,0.0,0.0,1.5,30.0,INVALID_PLAYER_ID,vehicleid,0,-1,-1,-1,LABEL_STREAM_DISTANCE);
}
else
  {
  UpdateDynamic3DTextLabelText(CarLabel[vehicleid],COLOR_VEHICULE,string);
  }
return 1;
}

Merci de votre aide

Hors ligne Xartrick

  • *
  • C & Pawn Programmer
  • Messages: 1391
    • Voir le profil
    • Xartrick's Area
Re : Problème commande plaque
« Réponse #1 le: 12 Décembre 2010, 15:38:30 »
Ta commande ne serait pas plutôt la suivante ?

Citation de: Commande
plaque

Hors ligne Lucifer

  • *
  • Tueur en série
  • Messages: 199
    • Voir le profil
    • Midtown States Role Play
Re : Problème commande plaque
« Réponse #2 le: 12 Décembre 2010, 15:46:07 »
Non c'est bien /vehicule plaque

Si je suis pas à l'endroit où il faut être, sa me dit que je suis pas au casier machin et quand j'y suis sa met unknow command