cher plus quel FS on a on l'as mis dans le GM
en respawn j'ai
public CarRespawn(carid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
{
gLastDriver[carid] = 255;
return 0;
}
}
}
SetVehicleToRespawn(carid);
gLastDriver[carid] = 299;
return 1;
}
et le seul CreateVehicle que j'ai il est la
:
new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
mais c'est dans ma commande /veh
if(strcmp(cmd, "/veh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 1339)
{
SendClientMessage(playerid, COLOR_GRAD1, " Tu n'es pas autorisé à utiliser cette commande !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " numero Vehicule ne peut pas être ci-dessous 400 ou au-dessus 611!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 252) { SendClientMessage(playerid, COLOR_GREY, " La couleur numero ne peut pas être ci-dessous 0 ou au-dessus 252 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_GREY, " La couleur numero ne peut pas être ci-dessous 0 ou au-dessus 252 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
format(string, sizeof(string), " Vehicule %d spawn.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}
voila Je change quoi svp ;D