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