29.03.2020, 17:40
Helo! i make a player textdraw for speedometer, all work only not
"Vehicle: X"
I found a include to get vehiclename and to show it and don't work.
If i make something like that is working
But if i try to make this is don't work
Some help?
"Vehicle: X"
I found a include to get vehiclename and to show it and don't work.
If i make something like that is working
PHP Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new String[128];
format(String,sizeof(String),"You are entering a(n) %s.",VehicleNames[GetVehicleModel(vehicleid) - 400]);
SendClientMessage(playerid,-1,String);
return 1;
}
PHP Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
// intra in masina
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
SetTimerEx("speed", 750, true, "i", playerid);
new string1[128];
format(string1,sizeof(string1),"Vehicle: %s",VehicleNames[GetVehicleModel(vehicleid) - 400]);
PlayerTextDrawSetString(playerid, cartype, string1);
PlayerTextDrawShow(playerid, cartype);
PlayerTextDrawShow(playerid,cartype);
}
// IESE DIN MASINA GATA SPEEDU
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
}
return 1;
}
PHP Code:
C:\Users\Calinacho\Desktop\server samp\gamemodes\test.pwn(331) : error 017: undefined symbol "vehicleid"