Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void checkcar(void){
- int vehicle, you = GetPlayerPed(), driver, netid, player;
- GET_CAR_CHAR_IS_USING(you, &vehicle);
- if (!DOES_VEHICLE_EXIST(vehicle))return;
- GET_DRIVER_OF_CAR(vehicle, &driver);
- if (driver != you)return;
- GET_NETWORK_ID_FROM_VEHICLE(vehicle, &netid);
- if (HAS_CONTROL_OF_NETWORK_ID(netid))return;
- for(player=0;player<16;player++){
- if (!IS_NETWORK_PLAYER_ACTIVE(player))continue;
- if (player == you)continue;
- if (DOES_PLAYER_HAVE_CONTROL_OF_NETWORK_ID(player, netid)){
- PRINT_STRING_WITH_TWO_LITERAL_STRINGS_NOW("STRING", GET_PLAYER_NAME(player), " has taken control of your car", 2500, 1);//some people seem to have trouble with this native, i never have but if you do, use the one below instead, it just shows their name, nothing else
- //PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", GET_PLAYER_NAME(player), 2500, 1);
- return;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment