Hi
Ich habe hier einen Code und ihc bekomme es nicht hin das es bei jedem auto so ist und nicht nur das das erste auto repariert wird
if(strcmp(cmd, "/stunt4", true) == 0)
{
new cartype = GetPlayerVehicleID(playerid);
new State=GetPlayerState(playerid);
SetPlayerInterior(playerid,0);
{
if(State!=PLAYER_STATE_DRIVER)
{
SetPlayerPos(playerid,-2316.5,-1640.0999755859,483.39999389648);
GivePlayerWeapon(playerid, 46, 1);
}
else if(IsPlayerInVehicle(playerid, cartype) == 1)
{
new Float:h;
new veh=GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, h);
if(h < 1000.0)RepairVehicle(veh);
SetVehiclePos(cartype,-2316.5,-1640.0999755859,483.39999389648);
SetVehicleZAngle(cartype,270);
}
else
{
SetPlayerPos(playerid,-2316.5,-1640.0999755859,483.39999389648);
}
GameTextForPlayer(playerid,"[] Welcome to The Stunt arena.[]",2500,3);
}
return 1;
}