Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetPlayerPoint_GPS_Map(index, playerid, icon[], color, Float:icon_size_X, Float:icon_size_Y, Float:x, Float:y)
- {
- new Float:td_X, Float:td_Y;
- if(x > 3000.0) x = 3000.0;
- else if(x < -3000.0) x = -3000.0;
- if(y > 3000.0) y = 3000.0;
- else if(y < -3000.0) y = -3000.0;
- new
- Float:converted_MAP_SIZE_X = floatdiv(map_td_SIZE_X, 2),
- Float:converted_MAP_SIZE_Y = floatdiv(map_td_SIZE_Y, 2),
- Float:converted_ICON_SIZE_X = floatdiv(icon_size_X, 2),
- Float:converted_ICON_SIZE_Y = floatdiv(icon_size_Y, 2);
- td_X = map_td_X + floatmul(floatdiv(converted_MAP_SIZE_X, 3000), x) + converted_MAP_SIZE_X - converted_ICON_SIZE_X;
- td_Y = map_td_Y + floatmul(floatdiv(-converted_MAP_SIZE_Y, 3000), y) + converted_MAP_SIZE_Y- converted_ICON_SIZE_Y;
- if(PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index] != PlayerText:INVALID_TEXT_DRAW)
- {
- PlayerTextDrawDestroy(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index]);
- PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index] = PlayerText:INVALID_TEXT_DRAW;
- }
- PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index] = CreatePlayerTextDraw(playerid, td_X, td_Y, icon);
- PlayerTextDrawLetterSize(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], 0.160333, 1.280592);
- PlayerTextDrawTextSize(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], icon_size_X, icon_size_Y);
- PlayerTextDrawAlignment(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], 1);
- PlayerTextDrawColor(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], color);
- PlayerTextDrawSetShadow(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], 0);
- PlayerTextDrawSetOutline(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], 0);
- PlayerTextDrawBackgroundColor(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], 255);
- PlayerTextDrawFont(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], 4);
- PlayerTextDrawSetProportional(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], 0);
- PlayerTextDrawSetShadow(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index], 0);
- PlayerTextDrawShow(playerid, PlayerTextdraws[playerid][ptextdraw_PLAYER_GPS_MAP][index]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement