#2

Try this.

pawn Код:
CMD:i(playerid, params[])
{
   new ID, string[900], string2[256], string3[900], name[100];
   if(sscanf(params, "i", ID)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /i [id]");
   if(IsPlayerConnected(ID) == 0)
   {
        SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
   }
   else
   {
        HideDraw(playerid);
        GetPlayerName(ID, name, 100);
           
        new veh = GetPlayerVehicleID(playerid);
        new Float:Distance = GetDistanceBetweenPlayers(playerid,ID);

        new Float:speed_x, Float:speed_y, Float:speed_z, Float:temp_speed, final_speed;
        GetVehicleVelocity(veh, speed_x,speed_y, speed_z);
        temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z)) * 136.666667;
        final_speed = floatround(temp_speed, floatround_round);
         
        new carid = GetPlayerVehicleID(ID);

        TextDrawShowForPlayer(playerid,infotext3);
        TextDrawShowForPlayer(playerid,infotext1);
        TextDrawShowForPlayer(playerid,INFOBOX);
        if(gTeam[playerid] == CIVILIANS)
        {
            if(!IsPlayerInAnyVehicle(ID))
            {
                format(string, 900, "            ~g~Player Info - ~r~~h~%s (%d)~n~                  ~g~Score - ~w~%d ~n~~n~~y~Location: ~w~%s~n~~y~Drive: ~w~%s~n~~y~Distance: ~w~%0.2f~n~~y~Speed: ~w~%d/mph~n~~y~Altitude: ~w~%s feet~n~~y~Wanted Level: ~w~%d", name, ID, GetPlayerScore(playerid), ReturnPlayerZone(ID),VehicleNames[GetVehicleModel(carid)-400],Distance,final_speed, GetAltitude(playerid), GetPlayerWantedLevel(ID));
                format(string3,900,"~y~Team: ~w~Civilian~n~~y~Hit Contract: ~g~$%d~n~~y~Group:", HasHit[ID]);
            }
            else
            {
                format(string, 900, "            ~g~Player Info - ~r~~h~%s (%d)~n~                  ~g~Score - ~w~%d ~n~~n~~y~Location: ~w~%s~n~~y~Drive: ~w~%s~n~~y~Distance: ~w~%0.2f~n~~y~Speed: ~w~%d/mph~n~~y~Altitude: ~w~%s feet~n~~y~Wanted Level: ~w~%d", name, ID, GetPlayerScore(playerid), ReturnPlayerZone(ID),VehicleNames[GetVehicleModel(carid)-400],Distance,final_speed, GetAltitude(playerid), GetPlayerWantedLevel(ID));
                format(string3,900,"~y~Team: ~w~Civilian~n~~y~Hit Contract: ~g~$%d~n~~y~Group:", HasHit[ID]);
            }
            TextDrawSetString(infotext1,string);
            TextDrawSetString(infotext3,string3);
            format(string2,256,"~n~~n~~n~~n~~n~~n~~n~~w~Type ~r~~h~LMB ~w~For Hide Thes~n~~w~Boxes!");
            TextDrawSetString(infotext2,string2);
        }
   }
}
Reply


Messages In This Thread
CMD - by STONEGOLD - 22.06.2015, 18:52
Re: CMD - by rappy93 - 22.06.2015, 18:56
Re: CMD - by STONEGOLD - 22.06.2015, 19:06
Re: CMD - by rappy93 - 22.06.2015, 19:13
Re: CMD - by STONEGOLD - 22.06.2015, 19:21
AW: CMD - by Mencent - 22.06.2015, 19:28

Forum Jump:


Users browsing this thread: 1 Guest(s)