14.11.2012, 20:46
hey guyss...
the problem is:
when i do /i it shows me the textdraw but it says unkown command (while im on foot)
but if im in vehicle the textdraw won't responce and nothing will appear and it will say uknown command,
im sure 100% problem is in the sscanf(params,ui)
because when i change it something get fixed and something get bugged and sometimes they both get bugged
pls help
the problem is:
when i do /i it shows me the textdraw but it says unkown command (while im on foot)
but if im in vehicle the textdraw won't responce and nothing will appear and it will say uknown command,
pawn Код:
new ID;
if(sscanf(params, "ui", ID)) SendClientMessage(playerid, BLANCO, "USAGE: /info(/i) [ID]");
else if(ID == INVALID_PLAYER_ID) SendClientMessage(playerid, ROJO, "Player is not connected!");
else
{
pawn Код:
TextDrawShowForPlayer(playerid,PlayerInfo2);
TextDrawShowForPlayer(playerid,PlayerLocationetc);
new carid = GetPlayerVehicleID(ID);
new zone[MAX_ZONE_NAME], string[100], name[50];
GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
GetPlayerName(ID,name,MAX_PLAYER_NAME+1);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(!IsPlayerInAnyVehicle(ID)&& civilianteam[playerid]==1 || ciateam[playerid]==1)
{
format(string, 256, "~n~ ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Feet: ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~0", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
GameTextForPlayer(playerid,"~n~ ~w~Press ~r~~h~LMB ~w~For Hide The~n~~w~Player Info!",5000,3);
}
else if(IsPlayerInAnyVehicle(ID)&& civilianteam[playerid]==1 || ciateam[playerid]==1)
{
format(string, 256, "~n~ ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Feet: ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~%d", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
GameTextForPlayer(playerid,"~n~ ~w~Press ~r~~h~LMB ~w~To Hide The~n~~w~Player Info!",5000,3);
}
pawn Код:
TextDrawSetString(PlayerLocationetc,string);
because when i change it something get fixed and something get bugged and sometimes they both get bugged
pls help