Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //camxxcore
- //work in progress
- int scaleFormPhoneApp;
- int Index;
- bool _shouldDraw = false;
- int index = -1;
- void AddPhoneContact(char * contactName, int slot)
- {
- //request ifruit handle
- scaleFormPhoneApp = REQUEST_SCALEFORM_MOVIE("cellphone_ifruit");
- //push function to the stack to change the data
- _PUSH_SCALEFORM_MOVIE_FUNCTION(scaleFormPhoneApp, "SET_DATA_SLOT");
- //not sure
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_FLOAT((float)2);
- //set data slot index
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_FLOAT((float)slot);
- //not sure
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_FLOAT(0.0f);
- _BEGIN_TEXT_COMPONENT("STRING");
- //add our text
- _ADD_TEXT_COMPONENT_STRING(contactName);
- _END_TEXT_COMPONENT();
- _BEGIN_TEXT_COMPONENT("CELL_MP_999");
- _END_TEXT_COMPONENT();
- _BEGIN_TEXT_COMPONENT("CELL_MP_999");
- _END_TEXT_COMPONENT();
- //pop and call on the stack
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- //increment index for next item
- //Index += 1;
- }
- void DisplayCallUI(char * contactName, char * picName = "CELL_300")
- {
- scaleFormPhoneApp = REQUEST_SCALEFORM_MOVIE("cellphone_ifruit");
- _PUSH_SCALEFORM_MOVIE_FUNCTION(scaleFormPhoneApp, "SET_DATA_SLOT");
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(4);
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(0);
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(3);
- _BEGIN_TEXT_COMPONENT("STRING");
- _0x65E1D404(contactName, -1);
- _END_TEXT_COMPONENT();
- _BEGIN_TEXT_COMPONENT("CELL_319");
- _END_TEXT_COMPONENT();
- _BEGIN_TEXT_COMPONENT("STRING");
- _0x65E1D404("DIALING...", -1);
- _END_TEXT_COMPONENT();
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- _PUSH_SCALEFORM_MOVIE_FUNCTION(scaleFormPhoneApp, "DISPLAY_VIEW");
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(4);
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- }
- int GetSelectedIndex()
- {
- int data;
- _PUSH_SCALEFORM_MOVIE_FUNCTION(scaleFormPhoneApp, "GET_CURRENT_SELECTION");
- int result = _POP_SCALEFORM_MOVIE_FUNCTION();
- if (!_0x5CD7C3C0(result))
- data = _0x2CFB0E6D(result);
- return data;
- }
- void UpdateiFruitApp() { //21 + b/c 16 players + 4 mission apps and + friends online 1 in my case
- if (_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(3073930887) > 0)
- {
- _shouldDraw = true;
- if (IS_CONTROL_PRESSED(2, INPUT_FRONTEND_RDOWN))
- {
- index = GetSelectedIndex();
- }
- }
- else
- _shouldDraw = false;
- if (_shouldDraw)
- {
- AddPhoneContact("Spawn Adder", Index = 21);
- AddPhoneContact("Teleport To Airport", Index = 22);
- }
- if (index != -1 && index == Index)
- {
- DisplayCallUI("Spawn Adder");
- }
- switch (Index)
- {
- case 21: //CreateVehicleM(VEHICLE_ADDER, -1027.7180f, -3013.5890f, 49.0911f);
- printf("adder spawned\n");
- break;
- case 22: //SET_ENTITY_COORDS_NO_OFFSET(PLAYER_PED_ID(), -1027.7180f, -3013.5890f, 49.0911f, 0, 0, 1);
- printf("tp to airport\n");
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement