Ich ahbe ein Script gemacht dass man mit /nitro 10x Nitro ins Car bekommt
unter OnplayerCommandtext
if (strcmp("/nitro", cmdtext, true) == 0)
{
if (IsPlayerInAnyVehicle(playerid))
{
if(IsNoNitroCar(GetVehicleModel(GetPlayerVehicleID(playerid))))
{
SendClientMessage(playerid,COLOR_RED,"Dein Auto ist nicht Nitro-Kampatibel!");
}
else
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
}
else SendClientMessage(playerid, COLOR_RED, "Du bist in keinem Fahrzeug!");
return 1;
}
stock IsNoNitroCar(vehicleid)
{
if(vehicleid == 581 || vehicleid == 523 || vehicleid == 462 || vehicleid == 521 ||
vehicleid == 463 || vehicleid == 522 || vehicleid == 461 || vehicleid == 448 ||
vehicleid == 468 || vehicleid == 586 || vehicleid == 509 || vehicleid == 481 ||
vehicleid == 510 || vehicleid == 472 || vehicleid == 473 || vehicleid == 493 ||
vehicleid == 595 || vehicleid == 484 || vehicleid == 430 || vehicleid == 453 ||
vehicleid == 452 || vehicleid == 446 || vehicleid == 454 || vehicleid == 590 ||
vehicleid == 569 || vehicleid == 537 || vehicleid == 538 || vehicleid == 570 || vehicleid == 449)
{
return 1;
}
else; return 0;
}
Aber ich bekomme einige Warnings und ein Error:
C:\DOKUME~1\Jonathan\Desktop\SAMP02~1.WIN\GAMEMO~1\stuntdm.pwn(428) : warning 217: loose indentation
C:\DOKUME~1\Jonathan\Desktop\SAMP02~1.WIN\GAMEMO~1\stuntdm.pwn(433) : warning 217: loose indentation
C:\DOKUME~1\Jonathan\Desktop\SAMP02~1.WIN\GAMEMO~1\stuntdm.pwn(434) : warning 217: loose indentation
C:\DOKUME~1\Jonathan\Desktop\SAMP02~1.WIN\GAMEMO~1\stuntdm.pwn(542) : error 036: empty statement