24.03.2016, 21:52
Hi i need anti mouse scroll tp hack like use scroll to sit on vehicle or tp on buildings
new PlayerEnterVehicle[MAX_PLAYERS] = INVALID_VEHICLE_ID;
PutPlayerInVehicle(playerid, vehicleid, seat) {
if(PutPlayerInVehicle(playerid, vehicleid, seat) == 1) {
PlayerEnterVehicle[playerid] = vehicleid;
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
PlayerEnterVehicle[playerid] = vehicleid;
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate) {
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) {
if(PlayerEnterVehicle[playerid] != GetPlayerVehicleID(playerid)) BanEx(playerid, "Vehicle Teleport Hacks");
PlayerEnterVehicle[playerid] = INVALID_VEHICLE_ID;
}
return 1;
}
public OnPlayerConnect(playerid) PlayerEnterVehicle[playerid] = INVALID_VEHICLE_ID;
IIRC scrolling into a vehicle doesn't call OnPlayerEnterVehicle. You can probably set a variable there, but you also have to put the PutPlayerInVehicle function into account as well as it doesn't call it either.
Example: pawn Код:
|
error 021: symbol already defined: "PutPlayerInVehicle" error 010: invalid function or declaration error 010: invalid function or declaration |
IIRC scrolling into a vehicle doesn't call OnPlayerEnterVehicle. You can probably set a variable there, but you also have to put the PutPlayerInVehicle function into account as well as it doesn't call it either.
Example: pawn Код:
|