Quote:
|
Originally Posted by Matthias™
Try this:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { for(new i = 0; i < MAX_PLAYERS; i++ ) { new Text:IC; new String[256]; format(String, sizeof(String), "~p~Car ID:~r~%d ~p~Car name:~r~%s", vehicleid, CarName[GetVehicleModel(GetPlayerVehicleID(i)-400]); IC = TextDrawCreate(260, 398, String); TextDrawAlignment(IC,0); TextDrawBackgroundColor(IC,0x000000ff); TextDrawFont(IC,1); TextDrawLetterSize(IC,0.699999,1.600000); TextDrawColor(IC,0xffffffff); TextDrawSetOutline(IC,1); TextDrawSetProportional(IC,1); TextDrawSetShadow(IC,1); TimeTextForPlayer(playerid,IC, 8000);//8 secunde } return 1; }
|
Dude, that isn't going to work. There is a "i" which is not defined. Test your scripts before you help someone, because imo you're posting bullshit now on several topics.
Simply change the "i" to playerid, because "i" probably was coded as a loop in another script. In this loop it is ment to gather all the connected players, so what you're trying to do here is trying to get all players vehicle ID. Change it on the format rule.
Edit: Also note that new String[256]; is unessesary because it will never reach 256 characters. Use 126 characters instead.