25.04.2012, 19:23
pawn Код:
// Not sure if I make the TD here. I would make a function to turn it on and off as needed and I think you need a way to update it as well.
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid); // Is the player in a vehicle?
if(Spawned[playerid] == 1) // This look like something that belongs at the very beginning.
{
if(newstate == PLAYER_STATE_ONFOOT) // Only do this if the newstate is onfoot...vehicle?
{
TextDrawHideForPlayer(playerid, Speed[playerid][Speedom]);
TextDrawHideForPlayer(playerid, Speed[playerid][Speedom2]);
new string[250];
TextDrawShowForPlayer(playerid, Speed[playerid][Speedom]);
format(string,sizeof(string),"~w~LoLocation: ~w~%s" ,ReturnPlayerZone(playerid));
TextDrawSetString(Speed[playerid][Speedom], string);
}
}
Quote:
my location not work on driving car but it's work only foot and i want that work on driving car see picture
and this is on foot and it's work http://i46.tinypic.com/24whvgn.png and i want my location work on foot or car driving adn this is my location code Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid = GetPlayerVehicleID(playerid); if(Spawned[playerid] == 1) { if(newstate == PLAYER_STATE_ONFOOT) { TextDrawHideForPlayer(playerid, Speed[playerid][Speedom]); TextDrawHideForPlayer(playerid, Speed[playerid][Speedom2]); new string[250]; TextDrawShowForPlayer(playerid, Speed[playerid][Speedom]); format(string,sizeof(string),"~w~LoLocation: ~w~%s" ,ReturnPlayerZone(playerid)); TextDrawSetString(Speed[playerid][Speedom], string); } } |