Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- #include pawn.cmd
- #define function%0(%1) \
- forward%0(%1); public%0(%1)
- static PhoneHudTimer[MAX_PLAYERS];
- static PlayerText:PhoneTextDraw[MAX_PLAYERS][16];
- static const PhoneMonthNames[] = {"JAN", "FEV", "MAR", "ABR", "MAI", "JUN", "JUL", "AGO", "SET", "OUT", "NOV", "DEZ"};
- main(){}
- public OnPlayerConnect(playerid)
- {
- PhoneTextDraw[playerid][0] = CreatePlayerTextDraw(playerid, 273.874969, 253.582992, "_");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][0], 0.000000, 16.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][0], 361.500000, 0.000000);
- PlayerTextDrawUseBox(playerid, PhoneTextDraw[playerid][0], 1);
- PlayerTextDrawBoxColor(playerid, PhoneTextDraw[playerid][0], 421075455);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][0], 0);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][0], 1);
- PhoneTextDraw[playerid][1] = CreatePlayerTextDraw(playerid, 273.750000, 253.583465, "LD_DUAL:backgnd");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][1], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][1], 88.500000, 144.000000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][1], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][1], -16776961);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][1], 0);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][1], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][1], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][1], 4);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][1], 0);
- PhoneTextDraw[playerid][2] = CreatePlayerTextDraw(playerid, 310.000000, 375.000000, "LD_POOL:ball");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][2], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][2], 15.000000, 15.000000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][2], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][2], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][2], 0);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][2], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][2], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][2], 4);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][2], 0);
- PlayerTextDrawSetSelectable(playerid, PhoneTextDraw[playerid][2], true);
- PhoneTextDraw[playerid][3] = CreatePlayerTextDraw(playerid, 318.000000, 264.000000, "00:00~n~0 JAN");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][3], 0.300000, 1.750000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][3], 2);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][3], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][3], 1);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][3], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][3], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][3], 2);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][3], 1);
- PhoneTextDraw[playerid][4] = CreatePlayerTextDraw(playerid, 283.000000, 305.000000, "hud:radar_cash");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][4], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][4], 15.000000, 15.000000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][4], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][4], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][4], 0);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][4], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][4], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][4], 4);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][4], 0);
- PlayerTextDrawSetSelectable(playerid, PhoneTextDraw[playerid][4], true);
- PhoneTextDraw[playerid][5] = CreatePlayerTextDraw(playerid, 279.649291, 320.633209, "Banco");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][5], 0.251248, 1.226665);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][5], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][5], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][5], 1);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][5], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][5], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][5], 1);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][5], 1);
- PhoneTextDraw[playerid][6] = CreatePlayerTextDraw(playerid, 312.000000, 305.000000, "hud:radar_waypoint");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][6], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][6], 15.000000, 15.000000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][6], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][6], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][6], 0);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][6], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][6], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][6], 4);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][6], 0);
- PlayerTextDrawSetSelectable(playerid, PhoneTextDraw[playerid][6], true);
- PhoneTextDraw[playerid][7] = CreatePlayerTextDraw(playerid, 312.000000, 320.000000, "GPS");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][7], 0.251248, 1.226665);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][7], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][7], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][7], 1);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][7], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][7], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][7], 1);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][7], 1);
- PhoneTextDraw[playerid][8] = CreatePlayerTextDraw(playerid, 339.000000, 306.000000, "LD_CHAT:goodcha");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][8], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][8], 15.000000, 15.000000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][8], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][8], -65281);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][8], 0);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][8], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][8], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][8], 4);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][8], 0);
- PlayerTextDrawSetSelectable(playerid, PhoneTextDraw[playerid][8], true);
- PhoneTextDraw[playerid][9] = CreatePlayerTextDraw(playerid, 337.000000, 320.000000, "SMS");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][9], 0.251248, 1.226665);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][9], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][9], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][9], 1);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][9], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][9], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][9], 1);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][9], 1);
- PhoneTextDraw[playerid][10] = CreatePlayerTextDraw(playerid, 283.000000, 340.500000, "LD_CHAT:thumbdn");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][10], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][10], 15.000000, 15.000000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][10], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][10], 16711935);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][10], 0);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][10], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][10], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][10], 4);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][10], 0);
- PlayerTextDrawSetSelectable(playerid, PhoneTextDraw[playerid][10], true);
- PhoneTextDraw[playerid][11] = CreatePlayerTextDraw(playerid, 282.000000, 357.500000, "OLX");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][11], 0.251248, 1.226665);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][11], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][11], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][11], 1);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][11], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][11], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][11], 1);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][11], 1);
- PhoneTextDraw[playerid][12] = CreatePlayerTextDraw(playerid, 311.500000, 339.500000, "hud:radar_police");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][12], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][12], 15.000000, 15.000000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][12], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][12], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][12], 0);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][12], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][12], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][12], 4);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][12], 0);
- PlayerTextDrawSetSelectable(playerid, PhoneTextDraw[playerid][12], true);
- PhoneTextDraw[playerid][13] = CreatePlayerTextDraw(playerid, 305.500000, 357.500000, "Policia");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][13], 0.251248, 1.226665);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][13], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][13], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][13], 1);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][13], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][13], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][13], 1);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][13], 1);
- PhoneTextDraw[playerid][14] = CreatePlayerTextDraw(playerid, 340.000000, 340.000000, "hud:radar_hostpital");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][14], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, PhoneTextDraw[playerid][14], 15.000000, 15.000000);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][14], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][14], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][14], 0);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][14], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][14], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][14], 4);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][14], 0);
- PlayerTextDrawSetSelectable(playerid, PhoneTextDraw[playerid][14], true);
- PhoneTextDraw[playerid][15] = CreatePlayerTextDraw(playerid, 336.000000, 357.000000, "SAMU");
- PlayerTextDrawLetterSize(playerid, PhoneTextDraw[playerid][15], 0.251248, 1.226665);
- PlayerTextDrawAlignment(playerid, PhoneTextDraw[playerid][15], 1);
- PlayerTextDrawColor(playerid, PhoneTextDraw[playerid][15], -1);
- PlayerTextDrawSetShadow(playerid, PhoneTextDraw[playerid][15], 1);
- PlayerTextDrawSetOutline(playerid, PhoneTextDraw[playerid][15], 0);
- PlayerTextDrawBackgroundColor(playerid, PhoneTextDraw[playerid][15], 255);
- PlayerTextDrawFont(playerid, PhoneTextDraw[playerid][15], 1);
- PlayerTextDrawSetProportional(playerid, PhoneTextDraw[playerid][15], 1);
- return 1;
- }
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
- {
- if(playertextid == PhoneTextDraw[playerid][2])
- HidePhoneTextDraw(playerid), KillTimer(PhoneHudTimer[playerid]), CancelSelectTextDraw(playerid);
- if(playertextid == PhoneTextDraw[playerid][4])
- SendClientMessage(playerid, -1, "* Banco");
- if(playertextid == PhoneTextDraw[playerid][6])
- SendClientMessage(playerid, -1, "* GPS");
- if(playertextid == PhoneTextDraw[playerid][8])
- SendClientMessage(playerid, -1, "* SMS");
- if(playertextid == PhoneTextDraw[playerid][10])
- SendClientMessage(playerid, -1, "* OLX");
- if(playertextid == PhoneTextDraw[playerid][12])
- SendClientMessage(playerid, -1, "* Policia");
- if(playertextid == PhoneTextDraw[playerid][14])
- SendClientMessage(playerid, -1, "* SAMU");
- return 1;
- }
- function OnPhoneHudUpdate(playerid)
- return PlayerTextDrawSetString(playerid, PhoneTextDraw[playerid][3], GetPhoneHudFormatted(playerid));
- GetPhoneHudFormatted(playerid)
- {
- new string[16], hour[3], date[3];
- gettime(hour[0], hour[1], hour[2]), getdate(date[2], date[1], date[0]);
- format(string, sizeof(string), "%02d:%02d~n~%d %s", hour[0], hour[1], date[0], PhoneMonthNames[date[1] - 1]);
- PlayerTextDrawSetString(playerid, PhoneTextDraw[playerid][3], string);
- return string;
- }
- ShowPhoneTextDraw(playerid)
- for(new i; i < sizeof(PhoneTextDraw[]); i++)
- PlayerTextDrawShow(playerid, PhoneTextDraw[playerid][i]);
- HidePhoneTextDraw(playerid)
- for(new i; i < sizeof(PhoneTextDraw[]); i++)
- PlayerTextDrawHide(playerid, PhoneTextDraw[playerid][i]);
- CMD:celular(playerid)
- {
- ShowPhoneTextDraw(playerid);
- SelectTextDraw(playerid, 0xFFFFFFAA);
- PhoneHudTimer[playerid] = SetTimerEx("OnPhoneHudUpdate", 1000, true, "i", playerid);
- PlayerTextDrawSetString(playerid, PhoneTextDraw[playerid][3], GetPhoneHudFormatted(playerid));
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement