PHP код:
#include <a_samp>
new tmp =0;
new PlayerText:FotoCarro;
public OnPlayerConnect(playerid)
{
FotoCarro = CreatePlayerTextDraw(playerid, 320.0, 310.0, "_");
PlayerTextDrawFont(playerid, FotoCarro, TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawBackgroundColor(playerid, FotoCarro, 0x00000000);
PlayerTextDrawBoxColor(playerid, FotoCarro, 0xFFFFFFFF);
PlayerTextDrawTextSize(playerid, FotoCarro, 100.0, 100.0);
PlayerTextDrawSetPreviewVehCol(playerid, FotoCarro, 0, 0);
PlayerTextDrawSetPreviewModel(playerid, FotoCarro, 411);
PlayerTextDrawSetPreviewRot(playerid, FotoCarro, -20.0, 0.0, float(tmp), 1.0);
return true;
}
public OnPlayerDisconnect(playerid, reason)
{
PlayerTextDrawHide(playerid, FotoCarro);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
PlayerTextDrawSetPreviewModel(playerid, FotoCarro, GetVehicleModel(vid));
PlayerTextDrawShow(playerid, FotoCarro);
}
else
{
PlayerTextDrawHide(playerid, FotoCarro);
}
return 1;
}
Faltou o parвmetro "playerid".