Hey, ich habe ein kleines Problem mit Pawn und zwar sind meine Kenntnisse etwas eingerostet Ich habe mich an ein Motor System gesetzt jedoch kommt das bei manchen Autos
https://www.imagebanana.com/s/773/TBjLc3zV.html
Code:
Code
ocmd:motor(playerid,params[])
{
if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER)return
SendClientMessage(playerid,COLOR_RED,"Du bist nicht der Fahrer eines Autos");
new vID=GetPlayerVehicleID(playerid),
tmp_engine,
tmp_lights,
tmp_alarm,
tmp_doors,
tmp_bonnet,
tmp_boot,
tmp_objective;
//Motor an/ausschalten
GetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
if(tmp_engine==1){
tmp_engine = 0;
}else{
tmp_engine = 1;
}
for(new i = 0; i<Max_Cars; i++)
{
if(vID == lspdcars[i])
{
if(pinfo[playerid][frak] == 1)
{
SetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
}else{
SendClientMessage(playerid,COLOR_RED,"**Der Schlüssel passt nicht**");
return 1;
}
break;
}else if(vID == muellcar[i]) {
if(pinfo[playerid][job] == 1){
SetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
}else {
SendClientMessage(playerid,COLOR_RED,"**Der Schlüssel passt nicht**");
return 1;
}
break;
}
}
return 1;
}
Alles anzeigen