SHOW:
|
|
- or go back to the newest paste.
| 1 | void cops_cheatLoop(){
| |
| 2 | set_entity_visible(copsobj, false);(PlayerId()); | |
| 3 | } | |
| 4 | ||
| 5 | /////////////////////////////////////////////// | |
| 6 | ||
| 7 | if (cheat_cops){
| |
| 8 | cops_cheatLoop(); | |
| 9 | } | |
| 10 | ||
| 11 | ////////////////////////////// | |
| 12 | ||
| 13 | ||
| 14 | if (cheat_cops){
| |
| 15 | float h; | |
| 16 | h = get_entity_heading(PlayerPedId()); | |
| 17 | printf("Got my heading\n");
| |
| 18 | copsobj = create_object(model, Position[0], Position[1], Position[2]); | |
| 19 | set_entity_coords(copsobj, -1938.795410, -995.770630, 14.479980, 1, 0, 0, 1); | |
| 20 | set_entity_rotation(copsobj,180,90,180,2,1); | |
| 21 | freeze_entity_position(copsobj, true); | |
| 22 | ShowMessageOnScreen("~g~ Active");
| |
| 23 | cheat_cops = false; | |
| 24 | } | |
| 25 | ||
| 26 | ||
| 27 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 28 | ||
| 29 | int copsobj; | |
| 30 | ||
| 31 | //////////////////////// | |
| 32 | code for the function | |
| 33 | ||
| 34 | bool cops_cheatLoop1 = false; | |
| 35 | int CopsCheat(int selectedIndex, vector<int> *selectedMenuIndexes, char *itemText, void *functionParameters) {
| |
| 36 | ||
| 37 | if(!cheat_cops){
| |
| 38 | cheat_cops = true; | |
| 39 | model = -1096777189; | |
| 40 | objectspawn = true; | |
| 41 | model = -1096777189; | |
| 42 | set_entity_visible(copsobj, false); | |
| 43 | objectspawn = true; | |
| 44 | cops_cheatLoop1 = true; | |
| 45 | ShowMessageOnScreen("~y~ Cops Cheat: ~g~ON!");
| |
| 46 | ||
| 47 | } | |
| 48 | else if(cheat_cops){
| |
| 49 | cheat_cops = false; | |
| 50 | cops_cheatLoop1 = false; | |
| 51 | ShowMessageOnScreen("~y~ Cops Cheat: ~r~OFF!");
| |
| 52 | } | |
| 53 | ||
| 54 | return 0; | |
| 55 | } |