Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- new MobileOn[MAX_PLAYERS];//to check if mobile is On or OFF :
- new MobileStats[MAX_PLAYERS];//mobile stats simply , like calling.. main or whatsever
- new Select[MAX_PLAYERS];
- new NewNum[MAX_PLAYERS][8];
- new Text:Mobile[16];//Mobile textdraw
- new Text:MobileNum[MAX_PLAYERS];//number the player is calling,
- new Text:MobileMain[MAX_PLAYERS];//Stats...
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Texdraws Mobile by Shabi RoxX ");
- print("--------------------------------------\n");
- //============================================
- // Mobile TextDraw Start #
- //============================================
- //Main BackGround With Nokai TAG
- Mobile[0] = TextDrawCreate(542.000000, 260.000000, "Nokia~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
- TextDrawAlignment(Mobile[0], 2);
- TextDrawBackgroundColor(Mobile[0], 255);
- TextDrawFont(Mobile[0], 1);
- TextDrawLetterSize(Mobile[0], 1.000000, 1.000000);
- TextDrawColor(Mobile[0], -1);
- TextDrawSetOutline(Mobile[0], 0);
- TextDrawSetProportional(Mobile[0], 1);
- TextDrawSetShadow(Mobile[0], 1);
- TextDrawUseBox(Mobile[0], 1);
- TextDrawBoxColor(Mobile[0], 2071823560);
- TextDrawTextSize(Mobile[0], 7.000000, 137.000000);
- //screen texdraw
- Mobile[1] = TextDrawCreate(542.000000, 282.000000, "_~n~~n~~n~~n~~n~");
- TextDrawAlignment(Mobile[1], 2);
- TextDrawBackgroundColor(Mobile[1], 255);
- TextDrawFont(Mobile[1], 1);
- TextDrawLetterSize(Mobile[1], 0.500000, 1.000000);
- TextDrawColor(Mobile[1], -1);
- TextDrawSetOutline(Mobile[1], 0);
- TextDrawSetProportional(Mobile[1], 1);
- TextDrawSetShadow(Mobile[1], 1);
- TextDrawUseBox(Mobile[1], 1);
- TextDrawBoxColor(Mobile[1], -1296911672);
- TextDrawTextSize(Mobile[1], 467.000000, 125.000000);
- //Button 1
- Mobile[2] = TextDrawCreate(493.000000, 361.000000, "1");
- TextDrawAlignment(Mobile[2], 2);
- TextDrawBackgroundColor(Mobile[2], 1504093896);
- TextDrawFont(Mobile[2], 1);
- TextDrawLetterSize(Mobile[2], 0.519999, 1.700000);
- TextDrawColor(Mobile[2], -1);
- TextDrawSetOutline(Mobile[2], 1);
- TextDrawSetProportional(Mobile[2], 1);
- TextDrawUseBox(Mobile[2], 1);
- TextDrawBoxColor(Mobile[2], 1431655880);
- TextDrawTextSize(Mobile[2], 31.000000, 18.000000);
- //Button 2
- Mobile[3] = TextDrawCreate(543.000000, 364.000000, "2");
- TextDrawAlignment(Mobile[3], 2);
- TextDrawBackgroundColor(Mobile[3], 1504093896);
- TextDrawFont(Mobile[3], 1);
- TextDrawLetterSize(Mobile[3], 0.519999, 1.700000);
- TextDrawColor(Mobile[3], -1);
- TextDrawSetOutline(Mobile[3], 1);
- TextDrawSetProportional(Mobile[3], 1);
- TextDrawUseBox(Mobile[3], 1);
- TextDrawBoxColor(Mobile[3], 1431655880);
- TextDrawTextSize(Mobile[3], 31.000000, 18.000000);
- //Button 3
- Mobile[4] = TextDrawCreate(592.000000, 361.000000, "3");
- TextDrawAlignment(Mobile[4], 2);
- TextDrawBackgroundColor(Mobile[4], 1504093896);
- TextDrawFont(Mobile[4], 1);
- TextDrawLetterSize(Mobile[4], 0.519999, 1.700000);
- TextDrawColor(Mobile[4], -1);
- TextDrawSetOutline(Mobile[4], 1);
- TextDrawSetProportional(Mobile[4], 1);
- TextDrawUseBox(Mobile[4], 1);
- TextDrawBoxColor(Mobile[4], 1431655880);
- TextDrawTextSize(Mobile[4], 31.000000, 18.000000);
- //Button 5
- Mobile[5] = TextDrawCreate(543.000000, 394.000000, "5");
- TextDrawAlignment(Mobile[5], 2);
- TextDrawBackgroundColor(Mobile[5], 1504093896);
- TextDrawFont(Mobile[5], 1);
- TextDrawLetterSize(Mobile[5], 0.519999, 1.700000);
- TextDrawColor(Mobile[5], -1);
- TextDrawSetOutline(Mobile[5], 1);
- TextDrawSetProportional(Mobile[5], 1);
- TextDrawUseBox(Mobile[5], 1);
- TextDrawBoxColor(Mobile[5], 1431655880);
- TextDrawTextSize(Mobile[5], 31.000000, 18.000000);
- //Button 5
- Mobile[6] = TextDrawCreate(493.000000, 391.000000, "4");
- TextDrawAlignment(Mobile[6], 2);
- TextDrawBackgroundColor(Mobile[6], 1504093896);
- TextDrawFont(Mobile[6], 1);
- TextDrawLetterSize(Mobile[6], 0.519999, 1.700000);
- TextDrawColor(Mobile[6], -1);
- TextDrawSetOutline(Mobile[6], 1);
- TextDrawSetProportional(Mobile[6], 1);
- TextDrawUseBox(Mobile[6], 1);
- TextDrawBoxColor(Mobile[6], 1431655880);
- TextDrawTextSize(Mobile[6], 31.000000, 18.000000);
- //Button 6
- Mobile[7] = TextDrawCreate(592.000000, 391.000000, "6");
- TextDrawAlignment(Mobile[7], 2);
- TextDrawBackgroundColor(Mobile[7], 1504093896);
- TextDrawFont(Mobile[7], 1);
- TextDrawLetterSize(Mobile[7], 0.519999, 1.700000);
- TextDrawColor(Mobile[7], -1);
- TextDrawSetOutline(Mobile[7], 1);
- TextDrawSetProportional(Mobile[7], 1);
- TextDrawUseBox(Mobile[7], 1);
- TextDrawBoxColor(Mobile[7], 1431655880);
- TextDrawTextSize(Mobile[7], 31.000000, 18.000000);
- //Button 8
- Mobile[8] = TextDrawCreate(543.000000, 423.000000, "8");
- TextDrawAlignment(Mobile[8], 2);
- TextDrawBackgroundColor(Mobile[8], 1504093896);
- TextDrawFont(Mobile[8], 1);
- TextDrawLetterSize(Mobile[8], 0.519999, 1.700000);
- TextDrawColor(Mobile[8], -1);
- TextDrawSetOutline(Mobile[8], 1);
- TextDrawSetProportional(Mobile[8], 1);
- TextDrawUseBox(Mobile[8], 1);
- TextDrawBoxColor(Mobile[8], 1431655880);
- TextDrawTextSize(Mobile[8], 31.000000, 18.000000);
- //Button 7
- Mobile[9] = TextDrawCreate(493.000000, 421.000000, "7");
- TextDrawAlignment(Mobile[9], 2);
- TextDrawBackgroundColor(Mobile[9], 1504093896);
- TextDrawFont(Mobile[9], 1);
- TextDrawLetterSize(Mobile[9], 0.519999, 1.700000);
- TextDrawColor(Mobile[9], -1);
- TextDrawSetOutline(Mobile[9], 1);
- TextDrawSetProportional(Mobile[9], 1);
- TextDrawUseBox(Mobile[9], 1);
- TextDrawBoxColor(Mobile[9], 1431655880);
- TextDrawTextSize(Mobile[9], 31.000000, 18.000000);
- //Button 9
- Mobile[10] = TextDrawCreate(592.000000, 421.000000, "9");
- TextDrawAlignment(Mobile[10], 2);
- TextDrawBackgroundColor(Mobile[10], 1504093896);
- TextDrawFont(Mobile[10], 1);
- TextDrawLetterSize(Mobile[10], 0.519999, 1.700000);
- TextDrawColor(Mobile[10], -1);
- TextDrawSetOutline(Mobile[10], 1);
- TextDrawSetProportional(Mobile[10], 1);
- TextDrawUseBox(Mobile[10], 1);
- TextDrawBoxColor(Mobile[10], 1431655880);
- TextDrawTextSize(Mobile[10], 31.000000, 18.000000);
- //UnDial Botton (Red)
- Mobile[11] = TextDrawCreate(589.000000, 342.000000, "=");
- TextDrawAlignment(Mobile[11], 2);
- TextDrawBackgroundColor(Mobile[11], 255);
- TextDrawFont(Mobile[11], 3);
- TextDrawLetterSize(Mobile[11], 0.519999, 0.4);
- TextDrawColor(Mobile[11], -16776961);
- TextDrawSetOutline(Mobile[11], 0);
- TextDrawSetProportional(Mobile[11], 1);
- TextDrawSetShadow(Mobile[11], 1);
- TextDrawUseBox(Mobile[11], 1);
- TextDrawBoxColor(Mobile[11], 1566399944);
- TextDrawTextSize(Mobile[11], 25.000000, 15.000000);
- //Main Menu Button
- Mobile[12] = TextDrawCreate(542.000000, 342.000000, "+");
- TextDrawAlignment(Mobile[12], 2);
- TextDrawBackgroundColor(Mobile[12], 255);
- TextDrawFont(Mobile[12], 3);
- TextDrawLetterSize(Mobile[12], 0.519999, 0.4);
- TextDrawColor(Mobile[12], -1);
- TextDrawSetOutline(Mobile[12], 1);
- TextDrawSetProportional(Mobile[12], 1);
- TextDrawUseBox(Mobile[12], 1);
- TextDrawBoxColor(Mobile[12], 1566399944);
- TextDrawTextSize(Mobile[12], 25.000000, 15.000000);
- //Dail Button (Green)
- Mobile[13] = TextDrawCreate(494.000000, 342.000000, "=");
- TextDrawAlignment(Mobile[13], 2);
- TextDrawBackgroundColor(Mobile[13], 255);
- TextDrawFont(Mobile[13], 3);
- TextDrawLetterSize(Mobile[13], 0.519999, 0.4);
- TextDrawColor(Mobile[13], 16711935);
- TextDrawSetOutline(Mobile[13], 0);
- TextDrawSetProportional(Mobile[13], 1);
- TextDrawSetShadow(Mobile[13], 1);
- TextDrawUseBox(Mobile[13], 1);
- TextDrawBoxColor(Mobile[13], 1566399944);
- TextDrawTextSize(Mobile[13], 25.000000, 15.000000);
- //TurnoFF BUTTON
- Mobile[14] = TextDrawCreate(600.000000, 264.000000, "=");
- TextDrawAlignment(Mobile[14], 2);
- TextDrawBackgroundColor(Mobile[14], 255);
- TextDrawFont(Mobile[14], 3);
- TextDrawLetterSize(Mobile[14], 0.519999, 0.699998);
- TextDrawColor(Mobile[14], -16776961);
- TextDrawSetOutline(Mobile[14], 0);
- TextDrawSetProportional(Mobile[14], 1);
- TextDrawSetShadow(Mobile[14], 1);
- TextDrawUseBox(Mobile[14], 1);
- TextDrawBoxColor(Mobile[14], 1566399944);
- TextDrawTextSize(Mobile[14], 33.000000, 9.000000);
- for(new i = 2;i < 15;i++)
- {
- TextDrawSetSelectable(Mobile[i], true);
- }
- Mobile[15] = TextDrawCreate(562.000000, 280.000000, "Time");
- TextDrawBackgroundColor(Mobile[15], 255);
- TextDrawFont(Mobile[15], 1);
- TextDrawLetterSize(Mobile[15], 0.500000, 1.000000);
- TextDrawColor(Mobile[15], -1);
- TextDrawSetOutline(Mobile[15], 0);
- TextDrawSetProportional(Mobile[15], 1);
- TextDrawSetShadow(Mobile[15], 1);
- for(new i = 0;i < MAX_PLAYERS;i++)
- {
- MobileMain[i] = TextDrawCreate(490.000000, 296.000000, "_");
- TextDrawBackgroundColor(MobileMain[i], 255);
- TextDrawFont(MobileMain[i], 2);
- TextDrawLetterSize(MobileMain[i], 0.369999, 1.199999);
- TextDrawColor(MobileMain[i], 16711935);
- TextDrawSetOutline(MobileMain[i], 0);
- TextDrawSetProportional(MobileMain[i], 1);
- TextDrawSetShadow(MobileMain[i], 1);
- MobileNum[i] = TextDrawCreate(492.000000, 313.000000, "_");
- TextDrawBackgroundColor(MobileNum[i], 255);
- TextDrawFont(MobileNum[i], 1);
- TextDrawLetterSize(MobileNum[i], 0.500000, 1.000000);
- TextDrawColor(MobileNum[i], 1721338568);
- TextDrawSetOutline(MobileNum[i], 0);
- TextDrawSetProportional(MobileNum[i], 1);
- TextDrawSetShadow(MobileNum[i], 1);
- }
- //============================================
- // Mobile TextDraw End #
- //============================================
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- CMD:mobile(playerid,params[])
- {
- if(MobileOn[playerid] != 1)//Mobile not ON
- {
- new String[24],hour,mins,secs;
- MobileOn[playerid] = 1;
- MobileStats[playerid] = 1;
- gettime(hour,mins,secs);
- format(String,sizeof(String),"%d:%d",hour,mins);
- TextDrawSetString(Mobile[15],String);
- for(new i = 0;i < 16;i++)
- {
- TextDrawShowForPlayer(playerid,Mobile[i]);
- }
- TextDrawShowForPlayer(playerid,MobileMain[playerid]);
- TextDrawShowForPlayer(playerid,MobileNum[playerid]);
- SelectTextDraw(playerid, 0x22A5DDC8);
- }
- else if(MobileOn[playerid] == 1 && Select[playerid] == -1)
- {
- Select[playerid] = 1;
- SelectTextDraw(playerid, 0x22A5DDC8);
- }
- else if(MobileOn[playerid] == 1 && Select[playerid] != -1)
- {
- MobileOn[playerid] = 0;
- MobileStats[playerid] = 1;
- for(new i = 0;i < 16;i++)
- {
- TextDrawHideForPlayer(playerid,Mobile[i]);
- }
- TextDrawHideForPlayer(playerid,MobileMain[playerid]);
- TextDrawHideForPlayer(playerid,MobileNum[playerid]);
- TextDrawSetString(MobileNum[playerid],"_");
- CancelSelectTextDraw(playerid);
- }
- return 1;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- for(new i = 2;i <= 10;i++)
- {
- if(clickedid == Mobile[i])
- {
- switch(i)
- {
- //number response
- case 2:format(NewNum[playerid],10,"%s1",NewNum[playerid]);
- case 3:format(NewNum[playerid],10,"%s2",NewNum[playerid]);
- case 4:format(NewNum[playerid],10,"%s3",NewNum[playerid]);
- case 5:format(NewNum[playerid],10,"%s5",NewNum[playerid]);
- case 6:format(NewNum[playerid],10,"%s4",NewNum[playerid]);
- case 7:format(NewNum[playerid],10,"%s6",NewNum[playerid]);
- case 8:format(NewNum[playerid],10,"%s8",NewNum[playerid]);
- case 9:format(NewNum[playerid],10,"%s7",NewNum[playerid]);
- case 10:format(NewNum[playerid],10,"%s9",NewNum[playerid]);
- }
- if(MobileStats[playerid] == 1 && strlen(NewNum[playerid]) < 10)
- {
- TextDrawSetString(MobileNum[playerid],NewNum[playerid]);
- PlayerPlaySound(playerid, 21001, 0, 0, 0);
- break;
- }
- }
- }
- //Green Button
- if(clickedid == Mobile[13])
- {
- if(MobileStats[playerid] == 1 && !isnull(NewNum[playerid]))
- {
- MobileStats[playerid] = 2;
- TextDrawSetString(MobileMain[playerid],"Calling");
- PlayerPlaySound(playerid, 21002, 0, 0, 0);
- }
- }
- if(clickedid == Mobile[11])
- {
- if(MobileStats[playerid] == 2 || MobileStats[playerid] == 1 && !isnull(NewNum[playerid]))
- {
- MobileStats[playerid] = 1;
- NewNum[playerid] = "";
- TextDrawSetString(MobileNum[playerid],"_");
- TextDrawSetString(MobileMain[playerid],"_");
- PlayerPlaySound(playerid, 21002, 0, 0, 0);
- }
- }
- //Off button
- if(clickedid == Mobile[14])
- {
- Select[playerid] = -1;
- CancelSelectTextDraw(playerid);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement