Abend,
Ich hab jetzt versucht einen Eigenen Tacho zu erstellen doch habe keine ahnung wie ich weiter machen muss
mein code ist derzeit so
(benutze LoH)
public VehStateCheck()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsANoTachoVehicle(GetPlayerVehicleID(i)))
{
new Float:health,vehicleid = GetPlayerVehicleID(i),Float:value,Float:distance,Float:x,Float:y,Float:z;
GetPlayerPos(i, x, y, z);
distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[i][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[i][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[i][PCarZ])),2));
value = floatround(distance * 11000);
GetVehicleHealth(vehicleid,health);
Textdraw1 = TextDrawCreate(446.000000, 364.000000, "Km/h: ~w~%d",floatround(value/1400));//Zeile12190
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw0, 0.509999, 1.199999);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(446.000000, 381.000000, "Tank: ~w~%d / %d",Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid));//Zeile 12198
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.519999, 1.200000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
Textdraw3 = TextDrawCreate(446.000000, 397.000000, "Zustand: ~w~%.2f",health);//Zeile 12206
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.490000, 1.400000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
Textdraw4 = TextDrawCreate(445.000000, 413.000000, "Name: ~w~%d",VehicleName[GetVehicleModel(vehicleid)-400]);//Zeile 12214
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.500000, 1.100000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
}
}
return 1;
}
Warnings& Error Codes
C:\Users\Test\Desktop\SAMP\gamemodes\GDR.pwn(12190) : warning 202: number of arguments does not match definition
C:\Users\Test\Desktop\SAMP\gamemodes\GDR.pwn(12198) : warning 202: number of arguments does not match definition
C:\Users\Test\Desktop\SAMP\gamemodes\GDR.pwn(12198) : warning 202: number of arguments does not match definition
C:\Users\Test\Desktop\SAMP\gamemodes\GDR.pwn(12198) : error 001: expected token: ",", but found ";"
C:\Users\Test\Desktop\SAMP\gamemodes\GDR.pwn(12206) : warning 202: number of arguments does not match definition
C:\Users\Test\Desktop\SAMP\gamemodes\GDR.pwn(12214) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Ich bedanke mich schoneinmal im vorraus für Hilfe
MFG
Shufro