if(gGas[playerid] == 1){ new str[10]; format(str,10,\"%d%\",Gas[vehicle]); TextDrawSetString(Benzin,str); TextDrawShowForPlayer(playerid,Benzin);}TextDrawShowForPlayer(playerid, Benzin);if(newstate == PLAYER_STATE_DRIVER){public CheckGas(){new string[256];for(new i=0;i<MAX_PLAYERS;i++){ if(IsPlayerConnected(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(i); if(Gas[vehicle] >= 1) { if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); if(gGas == 0) { GameTextForPlayer(i,\"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Kevés~w~ az üzemanyag\",5000,3); } } if(gGas == 1) { if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle)) { format(string, sizeof(string), \"N/A\"); } else { format(string, sizeof(string), \"%d%\",Gas[vehicle]); } TextDrawSetString(Benzin,string); } if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || engineOn[vehicle] == 0) { Gas[vehicle]++; } Gas[vehicle]--; } else { NoFuel = 1; TogglePlayerControllable(i, 0); GameTextForPlayer(i,\"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Kifogyott~w~ az üzemanyag~n~ a jármûbõl!\",1500,3); } } }}return 1;}
Esetleg tudsz valami megoldást ajánlani? :hmmm:
new Text:benzin[MAX_PLAYERS];
for(new i; i < MAX_PLAYERS; i++) benzin = TextDrawCreate(...
C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(7256) : warning 213: tag mismatchC:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(7256) : error 035: argument type mismatch (argument 2)C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(9150) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15571) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15572) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15573) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15574) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15575) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15576) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15577) : error 017: undefined symbol \"playerid\"
PlayerTextDrawSetString(Benzin[playerid],str);
PlayerTextDrawSetString(Benzin[playerid],string); }
Benzin[playerid] = CreatePlayerTextDraw(39.000000, 423.000000, \"100 %\");PlayerTextDrawBackgroundColor(Benzin[playerid], 255);PlayerTextDrawFont(Benzin[playerid], 2);PlayerTextDrawLetterSize(Benzin[playerid], 0.300000, 1.000000);PlayerTextDrawColor(Benzin[playerid], -1);PlayerTextDrawSetOutline(Benzin[playerid], 1);PlayerTextDrawSetProportional(Benzin[playerid], 1);
new PlayerText:Benzin[MAX_PLAYERS];if(gGas[playerid] == 1){ new str[10]; format(str,10,\"%d%\",Gas[vehicle]); PlayerTextDrawSetString(playerid, Benzin[playerid], str); PlayerTextDrawShow(playerid, Benzin[playerid]);} PlayerTextDrawShow(playerid, Benzin[playerid]);public OnPlayerExitVehicle(playerid, vehicleid){ PlayerTextDrawHide(playerid, Benzin[playerid]);public CheckGas(){new string[256];for(new i=0;i<MAX_PLAYERS;i++){ if(IsPlayerConnected(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(i); if(Gas[vehicle] >= 1) { if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); if(gGas == 0) { GameTextForPlayer(i,\"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Kevés~w~ az üzemanyag\",5000,3); } } if(gGas == 1) { if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle)) { format(string, sizeof(string), \"N/A\"); } else { format(string, sizeof(string), \"%d%\",Gas[vehicle]); } PlayerTextDrawSetString(playerid, Benzin[playerid], string); } if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || engineOn[vehicle] == 0) { Gas[vehicle]++; } Gas[vehicle]--; } else { NoFuel = 1; TogglePlayerControllable(i, 0); GameTextForPlayer(i,\"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Kifogyott~w~ az üzemanyag~n~ a jármûbõl!\",1500,3); } } }}return 1;}Benzin[playerid] = CreatePlayerTextDraw(39.000000, 423.000000, \"100 %\");PlayerTextDrawBackgroundColor(playerid, Benzin[playerid], 255);PlayerTextDrawFont(playerid, Benzin[playerid], 2);PlayerTextDrawLetterSize(playerid, Benzin[playerid], 0.300000, 1.000000);PlayerTextDrawColor(playerid, Benzin[playerid], -1);PlayerTextDrawSetOutline(playerid, Benzin[playerid], 1);PlayerTextDrawSetProportional(playerid, Benzin[playerid], 1);
PlayerTextDrawSetString(playerid, Benzin[playerid],str);
C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15572) : error 017: undefined symbol \"i\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15573) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15574) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15575) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15576) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15577) : error 017: undefined symbol \"playerid\"C:\\Documents and Settings\\1NSANE\\Asztal\\EndlessRPA.pwn(15578) : error 017: undefined symbol \"playerid\"Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 7 Errors.
Benzin = CreatePlayerTextDraw(39.000000, 423.000000, \"100 %\");PlayerTextDrawBackgroundColor(playerid, Benzin, 255);PlayerTextDrawFont(playerid, Benzin, 2);PlayerTextDrawLetterSize(playerid, Benzin, 0.300000, 1.000000);PlayerTextDrawColor(playerid, Benzin, -1);PlayerTextDrawSetOutline(playerid, Benzin, 1);PlayerTextDrawSetProportional(playerid, Benzin, 1);