Je viens de tester pour mettre en route/off le moteur, c'est styler, ya plus le son et tout. Par contre, j'ai un probleme, car fait une cmd pour allumer les phares du vehicule, et ils s'allument pas, voila le code(placer dans OnPlayerKeyStateChange(playerid, newkeys)):
<?php
if(newkeys == KEY_FIRE)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(IsPlayerConnected(playerid))
{
new sendername[32];
//new engine,lights,alarm,doors,bonnet,boot,objective;
new string[126];
if(EsUnAvion(car)){ return 1; }
//if(JeSuisEnLocation[car] == 0) { SendClientMessage(playerid, COL_RED, "Vous devez louer ce vehicule pour le demarer."); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
if(VehiculeInfo[car][Phares] == 0)
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
ProxDetector(30.0, playerid, "* Etranger allume les phares du vehicule.", COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "* %s allume les phares du vehicule.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
GetVehicleParamsEx(car,engine,lighttss,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,engine,1,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid, "~w~Phares Allumes...",3500,3);
VehiculeInfo[car][Phares] = 1;
return 1;
}
else
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
ProxDetector(30.0, playerid, "* Etranger eteind les phares du vehicule.", COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "* %s eteind les phares du vehicule.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
GetVehicleParamsEx(car,engine,lighttss,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,engine,0,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid, "~w~Phares Eteinds...",3500,3);
VehiculeInfo[car][Phares] = 0;
return 1;
}
}
}
}
}
J'ai les textes et tout, mais les phares s'allument pas, pourquoi? normalement, si j'ai bien compris comment il faut faire, c'est bon
++ Brian